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

Change python import sorter to isort and fix hassfest errors #360

Merged
merged 6 commits into from
Mar 5, 2024

Conversation

danelphick
Copy link
Contributor

Since reorder-python-imports and black conflict in how they format, the pre-commits were always failing. isort is designed to be compatible with black so it should not have these problems in the future.

Having changed the formatters, this then reformats all files so that the formatter pre-commits all pass.

Fixes #359

Since reorder-python-imports and black conflict in how they format, the
pre-commits were always failing. isort is designed to be compatible with
black so it should not have these problems in the future.

Having changed the formatters, this then reformats all files so that the
pre-commits all pass!
@danelphick
Copy link
Contributor Author

Not quite working yet. Perhaps a difference between my version of black and the one running on github. Let me fix this up.

This moves black's version from workflows/tests.yaml to
.pre-commit-config.yaml. The version is also upgraded to 24.2 from 23.3.
@danelphick
Copy link
Contributor Author

I've also upgraded python to 3.12, black to 24 and flake8 to 7.0.0 and now finally the "Linting / Pre-commit (pull_request)" stage passes.

@danelphick danelphick changed the title Change python import sorter to isort Change python import sorter to isort and fix hassfest errors Mar 5, 2024
@danelphick
Copy link
Contributor Author

With that last update all of the checks including hassfest pass so they've become useful as a gating mechanism again.

@nathanmarlor nathanmarlor merged commit 345257d into nathanmarlor:main Mar 5, 2024
3 checks passed
@nathanmarlor
Copy link
Owner

Thanks Dan, appreciated!

@danelphick danelphick deleted the pre-commit branch March 6, 2024 12:28
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.

Pre-commits conflict with each other
2 participants