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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/pylint
rev: v2.15.10
rev: v2.16.0b0
hooks:
- id: pylint
name: lint (examples)
Expand Down
7 changes: 0 additions & 7 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,3 @@ max-statements=50

# Minimum number of public methods for a class (see R0903).
min-public-methods=1


[EXCEPTIONS]

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
20 changes: 10 additions & 10 deletions jepler_udecimal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1798,16 +1798,16 @@ def _round_05up(self, prec):
else:
return -self._round_down(prec)

_pick_rounding_function = dict(
ROUND_DOWN=_round_down,
ROUND_UP=_round_up,
ROUND_HALF_UP=_round_half_up,
ROUND_HALF_DOWN=_round_half_down,
ROUND_HALF_EVEN=_round_half_even,
ROUND_CEILING=_round_ceiling,
ROUND_FLOOR=_round_floor,
ROUND_05UP=_round_05up,
)
_pick_rounding_function = {
ROUND_DOWN: _round_down,
ROUND_UP: _round_up,
ROUND_HALF_UP: _round_half_up,
ROUND_HALF_DOWN: _round_half_down,
ROUND_HALF_EVEN: _round_half_even,
ROUND_CEILING: _round_ceiling,
ROUND_FLOOR: _round_floor,
ROUND_05UP: _round_05up,
}

def __round__(self, n=None):
"""Round self to the nearest integer, or to a given precision.
Expand Down