-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce ruff/flake8-type-checking rules (TCH) #9728
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the advantage of this?
These imports will only be imported during type checking, not at run time. |
TCH001 Move application import into a type-checking block
TCH002 Move third-party import into a type-checking block
TCH003 Move standard library import into a type-checking block
14e5e50
to
a1ae5e9
Compare
Yes, though these are very cheap imports. I'm also cognizant of #9581... |
I was not aware of runtime type checking tools. Perhaps we need to keep the current status quo until we make sure TCH rules do the right thing, taking into account runtime typecheckers. Not sure they currently do the right thing, at least by default. From TCH001:
|
OK, I reckon given the uncertainty & low cost of these imports, let's push this off until the ecosystem has had a chance to coalesce on an option... |
No description provided.