Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

repos:
- repo: https://github.com/python/black
rev: 22.1.0
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/fsfe/reuse-tool
Expand All @@ -30,3 +30,17 @@ repos:
name: lint (code)
types: [python]
exclude: "^(docs/|examples/|setup.py$)"
- repo: local
hooks:
- id: mypy
name: mypy
entry: "mypy --no-warn-unused-ignores jepler_udecimal"
language: python
additional_dependencies: ["mypy==0.910"]
types: [python]
# use require_serial so that script
# is only called once per commit
require_serial: true
# Print the number of files as a sanity-check
verbose: true
pass_filenames: false
6 changes: 3 additions & 3 deletions jepler_udecimal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@

DecimalTuple = _namedtuple("DecimalTuple", "sign digits exponent")
except ImportError:
DecimalTuple = lambda *args: args
DecimalTuple = lambda *args: args # type: ignore

# Rounding
ROUND_DOWN = "ROUND_DOWN"
Expand Down Expand Up @@ -3574,7 +3574,7 @@ def _regard_flags(self, *flags):
self._ignored_flags.remove(flag)

# We inherit object.__hash__, so we must deny this explicitly
__hash__ = None
__hash__ = None # type: ignore

def Etiny(self):
"""Returns Etiny (= Emin - prec + 1)"""
Expand Down Expand Up @@ -5372,7 +5372,7 @@ def _convert_for_comparison(self, other, equality_op=False):
try:
import re
except:
import ure as re
import ure as re # type: ignore

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