3.3.x regression treating fstring as a constant: C0103
in scripts
#9963
Labels
Invalid
Not a bug, already exists or already fixed
C0103
in scripts
#9963
Bug description
It appears that fstrings in the script scope (not in a function anyway) are being identified as constants and linted inconsistently.
These are new findings in our codebases in the 3.3.x line
Configuration
No response
Command used
I also ran some combinations in docker to reproduce the issue:
And then I tested multiple versions of pylint with this script:
I also has similar results with Several versions of python (3.9, 3.10, 3.11, 3.12, etc)
Pylint output
I also tested versions 3.0, 3.1, 3.2 3.3.0 and 3.3.1 with this result:
Expected behavior
I expect that an fstring in the script scope would not result in a pylint error
C0103
congruent with the behavior prior to 3.3.0Pylint version
Also from docker python alpine image:
OS / Environment
Darwin(intel x64), reproducible in Docker
Additional dependencies
No response
Tasks
The text was updated successfully, but these errors were encountered: