We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
if
check_elif
1 parent 60f3939 commit 095928cCopy full SHA for 095928c
ChangeLog
@@ -37,6 +37,10 @@ Release date: TBA
37
38
* Relicense logo material under the CC BY-SA 4.0 license.
39
40
+* Skip `if` expressions from f-strings for the `check_elif` checker
41
+
42
+ Close #2816
43
44
45
What's New in Pylint 2.3.0?
46
===========================
pylint/extensions/check_elif.py
@@ -48,7 +48,9 @@ def process_tokens(self, tokens):
48
def leave_module(self, _):
49
self._init()
50
51
- def visit_ifexp(self, _):
+ def visit_ifexp(self, node):
52
+ if isinstance(node.parent, astroid.FormattedValue):
53
+ return
54
self._if_counter += 1
55
56
def visit_comprehension(self, node):
0 commit comments