Autoflake is removing imports specified in typehint comment
ranjith19 opened this issue · comments
Ranjith Ramachandra commented
For sqlalchemy code typehints are present in my codebase as comments (Old syntax)
from .class2 import Class2
class Class3:
f1 = Column(String) # type: Class2
When autoflake runs on this, it is making the import disappear
fsouza commented
This feature was removed in pyflakes 3 and autoflake 2, as those tools are now Python 3 only. If you need to use type hint comments, you should stick to autoflake<2.0.0
.