Ruff currently emits a false positive F811 on the following stub file:
from x import y as y
class Foo:
y = 42 # F811 Redefinition of unused `y` from line 1
There are really two y variables here -- one scoped within the Foo class, and one scoped within the module -- so I don't think this should trigger F811. Assignments without annotations in stub files are rare (which is why this hasn't come up before), but can be useful in enum classes. This bug came up in python/typeshed#11299.