Skip to content

Enable future annotations check in ruff/isort to reduce churn during python upgrades #3428

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

Open
jomcgi opened this issue Apr 16, 2025 · 0 comments

Comments

@jomcgi
Copy link
Contributor

jomcgi commented Apr 16, 2025

What problem do you want to solve?

Python upgrades allow us to utilize new typing features, implementing them during upgrades means touching a lot of files.

Describe the solution you'd like

Some of these typing improvements are available through future annotations.
If we enable:

  • Mandatory future annotation import through isort
  • Future annotations type checking through ruff

Then our code will be as forwards compatible as it can be for the baseline version of python reducing the amount of changes required to take advantage of new features.

Describe alternatives you've considered

Adding steps to the instructions for bumping the baseline instead of continuously enforcing it through ruff/isort.
This is possible but it would still result in a large number of code changes during upgrade as new files / instrumentations would not have benefited from the continuous check.

Additional Context

Related discussion on PR deprecating Python 3.8: #3399 (comment)

Would you like to implement a fix?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant