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

Pre-commits conflict with each other #359

Closed
danelphick opened this issue Mar 4, 2024 · 1 comment · Fixed by #360
Closed

Pre-commits conflict with each other #359

danelphick opened this issue Mar 4, 2024 · 1 comment · Fixed by #360

Comments

@danelphick
Copy link
Contributor

The formatters black and reorder-python-imports conflict with each other, which means the pre-commits always fail. This is because black inserts a new line between the docstring at the top and reorder-python-imports removes it. See psf/black#4175 for details.

There doesn't appear to be a workaround using these two tools, but one suggestion is to change from reorder-python-imports to isort which has black-compatibility as a goal. It would cause a bunch of churn as they have different sort policies, but the current files need sorting anyway according to reorder-python-imports. If you're interested, I'll go ahead and create a PR.

@nathanmarlor
Copy link
Owner

@danelphick I haven't had much time at all to spend on EM of late, so appreciate whatever you can do to keep it up to date :)

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 a pull request may close this issue.

2 participants