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

Ensure black formatting stability in workflow #43

Merged

Conversation

bj00rn
Copy link
Contributor

@bj00rn bj00rn commented Mar 21, 2024

I noticed my PRs are failing black even though i've made no changes. I think using recommended psf/black@stable action version and stability version will fix this

I noticed my PRs are failing black even though i've made no changes. Using psf/black@24.3.0 action version and stability version: "~= 22.0" will fix this

Seems that using psf/black@xx.yy.zz action does not guarantee black==xx.yy.zz format rules are used as one would expect.

  • use psf/black@23.3.0 and add stability version: "~= 22.0" to prevent workflow from failing due to upstream changes in black format

use psf/black@latest and set stability version to avoid workflow breaking

as per https://black.readthedocs.io/en/stable/integrations/github_actions.html#usage
frenck
frenck previously requested changes Mar 21, 2024
.github/workflows/black.yml Show resolved Hide resolved
@klaasnicolaas
Copy link
Contributor

In the future I would prefer to replace black with ruff

@bj00rn
Copy link
Contributor Author

bj00rn commented Mar 21, 2024

In the future I would prefer to replace black with ruff

agree, IMHO it would also be great to use pre-commit + pre-commit-action to pin and orchestrate the linting + tests to make contributing easier by running pre-commit locally.

Also maybe allowing lint workflow to be invoked without approval would reduce PR noise for you guys.

@bj00rn
Copy link
Contributor Author

bj00rn commented Mar 26, 2024

@frenck fixed the pinning, please merge and i will rebase other PR

@klaasnicolaas klaasnicolaas dismissed frenck’s stale review March 26, 2024 11:52

Fixed the requested change

@klaasnicolaas klaasnicolaas merged commit 70c94b9 into home-assistant-libs:master Mar 26, 2024
2 checks passed
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.

None yet

3 participants