Closed
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