-
Notifications
You must be signed in to change notification settings - Fork 119
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
Use from __future__ import annotations across all code #1336
Comments
In general, I'm in favour of using My one concern here is that it's uncertain when the behaviour will become the default, or if it will change before that happens. However, my knowledge here is very limited (reading over the docs just now, and listing to a few podcast episodes talking about this quite some time back that I only partially recall). I'm not even sure what the current situation is - the docs link to the 3.11 postponement but not to anything about 3.12 or 3.13. |
With |
Ooh, yes, if what Tony's saying is the case, I'd be in favour of this too. Let's confirm that and then do this. Can Pyright or Ruff or something automate the conversion? |
pyupgrade can. Ruff has pyupgrade's checks, so maybe it also can? |
See also canonical/ops-scenario#203 for this being done in Scenario. |
Current status: discussion
from __future__ import annotations
means we don't have to quote many type hints:Which originally stems from this:
I would argue that we should use new (py 3.10+) type hinting machinery and write our code almost as if it were for py 3.10+ only.
The text was updated successfully, but these errors were encountered: