-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a crash on psycopg2 for elif used (#5369)
* Fix a crash in the ``check_elif`` extensions where an undetected if in a comprehension with an if statement within a f-string resulted in an out of range error. The checker no longer relies on counting if statements anymore and uses known if statements locations instead. It should not crash on badly parsed if statements anymore. specify the confidence of the message * Remove disable for else-if-used in pylint/checkers/classes.py Co-authored-by: Daniël van Noord <[email protected]>
- Loading branch information
1 parent
e3a1e35
commit e8fa469
Showing
5 changed files
with
57 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
else-if-used:10:8:my_function:"Consider using ""elif"" instead of ""else if""":HIGH | ||
else-if-used:22:20:my_function:"Consider using ""elif"" instead of ""else if""":HIGH | ||
else-if-used:13:8:my_function:"Consider using ""elif"" instead of ""else if""":HIGH | ||
else-if-used:25:20:my_function:"Consider using ""elif"" instead of ""else if""":HIGH | ||
else-if-used:44:8:_if_in_fstring_comprehension_with_elif:"Consider using ""elif"" instead of ""else if""":HIGH | ||
else-if-used:47:12:_if_in_fstring_comprehension_with_elif:"Consider using ""elif"" instead of ""else if""":HIGH |