You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an alias is conditionally defined, as above, the name of the type alias ("_Foo") will appear more than once in the file (it will appear once for each conditional definition), which leads flake8-pyi to assume that the type alias has been "used" at least once in the file that it's been defined in.
The text was updated successfully, but these errors were encountered:
This caused me some confusion in python/typeshed#10177, where I expected Y047 to be emitted, but it wasn't.
Code like this currently doesn't cause Y047 to be emitted, but it probably should:
The reason is that this logic here is too naive:
flake8-pyi/pyi.py
Lines 1937 to 1939 in 5b17698
If an alias is conditionally defined, as above, the name of the type alias ("_Foo") will appear more than once in the file (it will appear once for each conditional definition), which leads flake8-pyi to assume that the type alias has been "used" at least once in the file that it's been defined in.
The text was updated successfully, but these errors were encountered: