Skip to content

Commit 9a1e49b

Browse files
committed
Merge remote-tracking branch 'origin/main' into pre-commit-ci-update-config
2 parents 05669f5 + 6007a78 commit 9a1e49b

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,17 @@ repos:
3030
name: lint (code)
3131
types: [python]
3232
exclude: "^(docs/|examples/|setup.py$)"
33+
- repo: local
34+
hooks:
35+
- id: mypy
36+
name: mypy
37+
entry: "mypy --no-warn-unused-ignores jepler_udecimal"
38+
language: python
39+
additional_dependencies: ["mypy==0.910"]
40+
types: [python]
41+
# use require_serial so that script
42+
# is only called once per commit
43+
require_serial: true
44+
# Print the number of files as a sanity-check
45+
verbose: true
46+
pass_filenames: false

jepler_udecimal/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
DecimalTuple = _namedtuple("DecimalTuple", "sign digits exponent")
143143
except ImportError:
144144

145-
def DecimalTuple(*args):
145+
def DecimalTuple(*args): # type: ignore
146146
return args
147147

148148

@@ -3577,7 +3577,7 @@ def _regard_flags(self, *flags):
35773577
self._ignored_flags.remove(flag)
35783578

35793579
# We inherit object.__hash__, so we must deny this explicitly
3580-
__hash__ = None
3580+
__hash__ = None # type: ignore
35813581

35823582
def Etiny(self):
35833583
"""Returns Etiny (= Emin - prec + 1)"""
@@ -5375,7 +5375,7 @@ def _convert_for_comparison(self, other, equality_op=False):
53755375
try:
53765376
import re
53775377
except:
5378-
import ure as re
5378+
import ure as re # type: ignore
53795379

53805380
_parser = re.compile( # A numeric string consists of:
53815381
r"([-+])?" # an optional sign, followed by either... # 1

0 commit comments

Comments
 (0)