-
Notifications
You must be signed in to change notification settings - Fork 196
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
Enforce import sorting #608
Conversation
Just a note to self: we should run these as part of CI to ensure there's no drift (#568). |
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.
lgtm
c6ff2c5
to
27dfe05
Compare
@caspervonb I've rebased 👌 I also tried adding an isort check to the cicd. But, I had to update the lock file. And it looks like it hasn't updated in quite a while (lots of version bumps), and some tests seem to be failing as a result. So ... it's a bit too much to try squeeze in to this PR, so I'll make a separate one for that: #611
Edit: or, it looks like something else went wrong, causing the new tests to fail. First thought it was the lockfile update |
Oops. autoflake removed the try:
import aiohttp
aiohttp_installed = True
except ModuleNotFoundError:
aiohttp_installed = False which broke one of the tests. My bad, missed that |
I'm going to go ahead and merge this today but before I do I'll add a check to GitHub workflows, otherwise it's a shifting target. |
@caspervonb I already took a crack at it: #611 |
I ran |
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
rebased 👌 |
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
@caspervonb I cherry-picked the commits from #611 here, and moved the cicd check to the new check.yaml |
Thank you, on the list for today. |
I've been thinking of replacing isort with ruff, as it'll serve as a replacement for flake, isort and yapf. But I'm okay with merging this in the meantime. |
Good stuff, I actually wanted to recommend ruff instead of isort/pyflake/yapf, but didn't want to impose 😄 |
Noticed that pyproject.toml configures isort. But, imports weren't sorted.
So, just runs
isort
(ensuring the config is used), and ranautoflake --remove-all-unused-imports
for good measure. Just some artsy cleanup.Edit: and adds isort check to cicd