Skip to content
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

Run isort before and after autoflake. #82

Merged
merged 3 commits into from Mar 2, 2023

Conversation

DRMacIver
Copy link
Contributor

@DRMacIver DRMacIver commented Mar 2, 2023

Fixes #78, #75

The proposed solution in #78 was to swap the order of isort and autoflake, but this doesn't currently work because you run into PyCQA/autoflake#106 (which I think is the reason why it's currently the way around that it is). Running isort, then autoflake, then isort again, seems to be sufficient to solve this problem.

I looked into a more sophisticated solution which treats this as a running multiple passes to their collective fixed point, and it worked fine but didn't seem to have any real benefit to it and was a bit messier than what was currently here, so this just takes the simplest approach that will work.

Copy link
Owner

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shed requiring two passes when removing import causes ordering confusion
2 participants