-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[chore] add UP rule to ruff and upgrade to Python 3.9 syntax #25703
base: master
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @danielgafni and the rest of your teammates on Graphite |
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-fvce03v3g-elementl.vercel.app Direct link to changed pages: |
Deploy preview for dagster-docs-beta ready! Preview available at https://dagster-docs-beta-owcusk788-elementl.vercel.app Direct link to changed pages: |
I think this is great, and am in favor of inclusion of Will wait for approval from at least one other though to ensure consensus. |
Anyone wants to give another review? |
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.
Left a comment on the pyproject.toml.
Also this needs an internal companion PR to keep these OSS/internal in sync.
Otherwise nice!
After switching to
After running
Deprecated import errors are similar to:
Unused import errors look like:
I've added both rules to |
b7fba29
to
1cd51c5
Compare
With the above, we could also then announce this to end-headsup so people know what the have to "untrain" themselves from writing. |
1cd51c5
to
aa08de4
Compare
Hey @schrockn, I added violation stats to the PR description. For sure it's impossible to review, but the number of |
aa08de4
to
22d263f
Compare
Actually, there are some failures in BuildKite because some parts of it are still running on Python |
Summary & Motivation
Hello, I really like running
ruff
on Dagster.This PR adds the pyupgrade rule which automatically updates Python syntax & usage to the minimal supported Python version (
3.9
in our case).The only exception is
dagster-buildkite
since it's still running on 3.8 (@gibsondan how hard would it be to bump Python in BuildKite?).See
pyproject.toml
diff:All other changes are automated.
Initial
UP
violations:Violations after
ruff check --fix
(before--unsafe-fixes
):And before ignoring the unfixable rules: