-
Notifications
You must be signed in to change notification settings - Fork 89
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 isort #1666
chore: add isort #1666
Conversation
|
Currently I think our imports are somewhat order-dependent. The |
The imports in |
Codecov Report
Additional details and impacted files
|
9aead67
to
6bd1e10
Compare
As we discussed today, this will go after the 1.10.0 release and before the git-split. |
It looks like all of these changes are generated by this one change to .pre-commit-config.yaml: @@ -19,6 +19,12 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: "5.10.1"
hooks:
- id: isort
exclude: ^src/(awkward|awkward/_v2)/__init__\.py$
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.0.0
hooks: Considering that PR #1690 (dropping v1) is at an advanced stage, let's close this PR and reapply the above to |
Signed-off-by: Henry Schreiner <[email protected]>
6bd1e10
to
b3f4a4f
Compare
@jpivarski could I get your sign-off that we can merge this now that I've rebased it? |
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.
This seems to be correct—it's changing the import order of post-v1-dropping files, such as src/awkward/_broadcasting.py
(which didn't exist pre-v1-drop).
I'm signing off on it, but I'll let you merge it, in case that needs to be done in a special way.
It's the same error in Codecov as before:
On the other one, #1715, restarting the one job didn't fix it (not intermittent). |
This adds isort, which sorts the includes, removing that as a variable and enabling things like injecting
__future__
imports later.If there are any "this needs to be imported before that" rules, we can add those as isort rules.