-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
C: used-before-assignmentIssues related to 'used-before-assignment' checkIssues related to 'used-before-assignment' checkFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Milestone
Description
Bug description
from typing import TYPE_CHECKING
if TYPE_CHECKING:
pass
elif 42:
import math
print(math)
Configuration
No response
Command used
pylint a.py
Pylint output
************* Module a
a.py:5:5: W0125: Using a conditional statement with a constant value (using-constant-test)
a.py:9:6: E0601: Using variable 'math' before assignment (used-before-assignment)
--------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 10.00/10, -10.00)
Expected behavior
************* Module a
a.py:5:5: W0125: Using a conditional statement with a constant value (using-constant-test)
--------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 10.00/10, -10.00)
Pylint version
pylint 3.0.0a6
astroid 2.16.0dev0
Python 3.11.0
OS / Environment
No response
Additional dependencies
No response
Metadata
Metadata
Assignees
Labels
C: used-before-assignmentIssues related to 'used-before-assignment' checkIssues related to 'used-before-assignment' checkFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation