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
The latest version of flake8 also does not understand type comments; flake8 3.9.2 is several years old now. It dropped support so that it could improve performance, and because there's no reason to use type comments unless you support very old Python versions that have been end-of-life for a long time. The relevant change here is in one of the builtin flake8 plugins, pyflakes:
Since great tools such as https://github.com/ilevkivskyi/com2ann exist that can help people auto-upgrade their legacy type comments to type annotations, I'm therefore sceptical that ruff should add support for type comments.
Version
Code with import:
Result:
Code without import:
Result:
This means that Ruff does not interpret type comment while flake8 does.
I searched for "type comment".
Found by a collegue of mine @braineo .
The text was updated successfully, but these errors were encountered: