-
Notifications
You must be signed in to change notification settings - Fork 198
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
isort
on the test code
#3106
isort
on the test code
#3106
Conversation
isort *should* only resort import statement and add white spaces to separate different categories of imports
seems fine though i didn't examine the giant diff in great detail. it would be good to run with --check-only alongside flake8, mypy so that linting-edit-wars don't arise. |
I checked with flake8 and there are no conflicts there. All tests are passing as well. |
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.
I'm personally in favor of this. It may not be to everyone's precise liking, but it is canonical and removes the human factor of "but my way is better than your way."
In terms of making it not conflict with flake8 and other tools, there is a best-practice ordering for entry into pre-commit (or another linting tool). I'm happy to add that, or @yadudoc it's all you. Either way, I'm definitely, definitely in favor of adding at least flake8, pyupgrade, isort, and black into a pre-commit hook.
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.
please introduce CI enforcement of this if you're intending to change the house style: this is going to diverge from sortedness within a few commits otherwise
Fair enough. It sounds like we are agreed that this is a good idea, so here's what I'll do:
|
slightly cynically I have some interest in what kind of import-race-conditions this uncovers... |
If you're adding |
given the current burst of new user/across codebase activity from Outreachy, I think don't do such a code-disrupting change as this for a few more weeks... it will break many people with outstanding changes vs |
superseded by #3421 |
Description
isort
should only resort import statements and add white spaces to separate different categories of imports.This PR should not introduce any functional changes. I wanted to get some feedback before sticking isort on the rest of the codebase. If folks like the changes, I'd like to add this to the linter scripts.
Changed Behaviour
No functional changes.
Type of change
Choose which options apply, and delete the ones which do not apply.