summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchohner <mail@chohner.com>2021-04-07 20:53:20 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-04-07 22:10:49 +0200
commitab094aef2504d9603b8332607298242db8968335 (patch)
tree2e7028767aa5743ff5b984d2aa97bb4688b98fb8
parentb6ce99bb8158c4ac05ae7f0bd6fd12c6cdbeaa11 (diff)
downloadpylint-git-ab094aef2504d9603b8332607298242db8968335.tar.gz
pass if score equals fail_under
-rw-r--r--ChangeLog2
-rw-r--r--pylint/lint/run.py2
-rw-r--r--tests/test_self.py2
3 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 52aa04b5a..5ed2fa9ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/pylint/lint/run.py b/pylint/lint/run.py
index 82ea51a09..825d0d7f6 100644
--- a/pylint/lint/run.py
+++ b/pylint/lint/run.py
@@ -369,7 +369,7 @@ group are mutually exclusive.",
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)
diff --git a/tests/test_self.py b/tests/test_self.py
index a6d4ed442..1a8acc969 100644
--- a/tests/test_self.py
+++ b/tests/test_self.py
@@ -665,7 +665,7 @@ class TestRunTC:
"--enable=all",
join(HERE, "regrtest_data", "fail_under_plus6.py"),
],
- code=0,
+ code=16,
)
self._runtest(
[