Skip to content

Clarify the target of no-else elif suggestions - #11362

Open
Jokasa7 wants to merge 2 commits into
pylint-dev:mainfrom
Jokasa7:JoyCx/pylint-9274-no-else-return-docs
Open

Clarify the target of no-else elif suggestions#11362
Jokasa7 wants to merge 2 commits into
pylint-dev:mainfrom
Jokasa7:JoyCx/pylint-9274-no-else-return-docs

Conversation

@Jokasa7

@Jokasa7 Jokasa7 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Type of Changes

Type
🐛 Bug fix
📜 Docs

Description

The no-else-return diagnostic is emitted on the preceding if, while its
suggestion refers to an elif later in the chain. In a chain with more than one
elif, the previous wording—remove the leading "el" from "elif"—did not make
it clear which keyword should change. That ambiguity is the source of the
unsafe-looking transformation reported in #9274.

This change makes the suggested edit explicit: replace only the first elif
following the reported branch with if. The checker uses the same suggestion
builder for no-else-return, no-else-raise, no-else-break, and
no-else-continue, so the corresponding functional expectations are updated
together. Detection, message location, confidence, message IDs, and local
suppression behavior are unchanged.

The no-else-return documentation now uses a multi-elif example in which the
first non-returning branch falls through. Its corrected form changes only the
targeted elif and keeps the later elif/else chain attached. Additional
guidance explains that a later Pylint run may report another independently
redundant branch, and that retaining an exhaustive-looking chain can be a valid
readability choice handled with a local disable.

Validation:

  • python -m pytest tests/test_functional.py -k "no_else_return or no_else_raise or no_else_break or no_else_continue" — 4 passed
  • python -m pytest doc/test_messages_documentation.py — 852 passed, 2 skipped
  • sphinx-build -T -W -j auto --keep-going -b html -d _build/doctrees -D language=en . _build/html — build succeeded
  • pre-commit run --all-files — all hooks passed
  • git diff --check — passed

Closes #9274

AI assistance was used for issue and code-path research and for drafting. I
reviewed the final diff and ran the validation listed above.

Make the shared no-else action identify the first following elif, and document the multi-elif transformation and local-disable tradeoff for no-else-return.\n\nCloses pylint-dev#9274
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.42%. Comparing base (5ba4f69) to head (6a00b57).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #11362   +/-   ##
=======================================
  Coverage   96.42%   96.42%           
=======================================
  Files         178      178           
  Lines       20131    20136    +5     
=======================================
+ Hits        19412    19417    +5     
  Misses        719      719           
Files with missing lines Coverage Δ
pylint/checkers/refactoring/refactoring_checker.py 98.43% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

This comment has been minimized.

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for tackling this one! I think this is too verbose, let's change the message content for something clearer but let's not details too much either.

Comment thread pylint/checkers/refactoring/refactoring_checker.py Outdated
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Effect of this PR on checked open source code: 🤖

Effect on astropy:

Changed messages:

Details
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
                                      ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-continue:
- Unnecessary "elif" after "continue", remove the leading "el" from "elif"
+ Unnecessary "elif" after "continue", replace only that "elif" with "if"
                                         ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-return:
- Unnecessary "elif" after "return", remove the leading "el" from "elif"
+ Unnecessary "elif" after "return", replace only that "elif" with "if"
                                       ^^^^^^ ^^^    ^       ^^^^^^^^^^
  1. no-else-raise:
- Unnecessary "elif" after "raise", remove the leading "el" from "elif"
+ Unnecessary "elif" after "raise", replace only that "elif" with "if"
...

This comment was truncated because GitHub allows only 65536 characters in a comment.

This comment was generated for commit 6a00b57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no-else-return / R1705 instructs users to use error-prone construction

2 participants