Skip to content

Commit

Permalink
pass if score equals fail_under
Browse files Browse the repository at this point in the history
  • Loading branch information
chohner authored and Pierre-Sassoulas committed Apr 7, 2021
1 parent b6ce99b commit ab094ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Expand Up @@ -34,6 +34,8 @@ Release date: Undefined
..
Put bug fixes that will be cherry-picked to latest major version here

* Run will not fail if score exactly equals ``config.fail_under`.

* Functions that never returns may declare ``NoReturn`` as type hints, so that
``inconsistent-return-statements`` is not emitted.

Expand Down
2 changes: 1 addition & 1 deletion pylint/lint/run.py
Expand Up @@ -369,7 +369,7 @@ def __init__(
if linter.config.exit_zero:
sys.exit(0)
else:
if score_value and score_value > linter.config.fail_under:
if score_value and score_value >= linter.config.fail_under:
sys.exit(0)
sys.exit(self.linter.msg_status)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_self.py
Expand Up @@ -665,7 +665,7 @@ def test_fail_under(self):
"--enable=all",
join(HERE, "regrtest_data", "fail_under_plus6.py"),
],
code=0,
code=16,
)
self._runtest(
[
Expand Down

0 comments on commit ab094ae

Please sign in to comment.