pylint
pylint copied to clipboard
Fix 'function never returning' computation
This fixes 2 bugs in the computation:
Never is handled in addition to NoReturn. Give priority to the explicit --never-returning-functions option.
This PR was copied from https://github.com/pylint-dev/pylint/pull/9535 (I cannot add commits there and we really need this).
Type of Changes
| Type | |
|---|---|
| β | :bug: Bug fix |
Description
Closes https://github.com/pylint-dev/pylint/issues/7565
π€ According to the primer, this change has no effect on the checked open source code. π€π
This comment was generated for commit eb30f7c48c4fed1245899a502e16f0365dc8afa1
@antoniogamizbadger Would you like to continue working on this?
π€ According to the primer, this change has no effect on the checked open source code. π€π
This comment was generated for commit 5216ea997c5d85b7ab356878386e89faf7f0c3da
π€ According to the primer, this change has no effect on the checked open source code. π€π
This comment was generated for commit fe4c3d327c6a0edf1f014c2be1b19325f3223dc3
π€ According to the primer, this change has no effect on the checked open source code. π€π
This comment was generated for commit 27ba1f8af36674489de1d9a5a8451b3c2f982d13
@antoniogamizbadger Thanks for the contribution!
(Shouldn't there be a Never used somewhere ?)
This is covered by the call to assert_never(), which is annotated to return Never. Reverting that part of the patch causes a test failure, so it's covered.
Codecov Report
Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
Project coverage is 95.78%. Comparing base (
d9ea2f7) to head (95b6e8b). Report is 123 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| pylint/checkers/refactoring/refactoring_checker.py | 71.42% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #9591 +/- ##
==========================================
- Coverage 95.80% 95.78% -0.02%
==========================================
Files 174 174
Lines 18885 18880 -5
==========================================
- Hits 18092 18085 -7
- Misses 793 795 +2
| Files with missing lines | Coverage Ξ | |
|---|---|---|
| pylint/checkers/variables.py | 97.23% <ΓΈ> (ΓΈ) |
|
| pylint/checkers/refactoring/refactoring_checker.py | 98.16% <71.42%> (-0.22%) |
:arrow_down: |
Coverage decrease is from moving existing uncovered lines around.
π€ According to the primer, this change has no effect on the checked open source code. π€π
This comment was generated for commit 95b6e8bf052347eb56cc7a5cfde0951d6aa40bd0