-
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] ruff: ban relative imports #23816
Conversation
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-kfxuusiik-elementl.vercel.app Direct link to changed pages: |
3a16402
to
5b7c942
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @danielgafni and the rest of your teammates on Graphite |
5b7c942
to
5e5adcc
Compare
820e45a
to
392f182
Compare
Nevermind, it looks like the |
392f182
to
99d56d1
Compare
How many pairs of eyes do we want for a diff as huge as this one? |
d8e9806
to
98137a5
Compare
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.
Ok let's do this. I can announce in eng heads up.
You will also want to do this in internal
as well.
98137a5
to
744d89d
Compare
All CI failures are also happening in |
Summary & Motivation
Internal discussion: https://github.com/dagster-io/internal/discussions/11157
Relative imports are discouraged in Python.
ruff
docs:2. I'm trying to migrate touv
for packaging in #23814. Currently,uv
only supportssrc
-based project layout (astral-sh/uv#5328), and some of the current relative imports break after switching to it (code smell!). Using absolute imports should fix this issue.Edit: this turned out to be wrong
Steps performed to produce this PR:
docs/
andexamples/
.run
ruff check --fix --unsafe-fixes
This produces most of the automatic changes in this PR.
fix a single pytest error
fix a few pyright errors
How I Tested These Changes
Existing tests should pass. The only test which required tweaking was testing line numbers lol
Changelog [New | Bug | Docs]