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

fix: CI is currently failing on master #385

Closed
curita opened this issue Feb 6, 2023 · 3 comments · Fixed by #387
Closed

fix: CI is currently failing on master #385

curita opened this issue Feb 6, 2023 · 3 comments · Fixed by #387
Milestone

Comments

@curita
Copy link
Member

curita commented Feb 6, 2023

Issue

Newly opened PRs are failing in their Python 3.10 build (reference).

Cause

This looks to be caused by the black check, which in its latest version introduced some new rules (removing new lines after class and function declarations, adding trailing commas to the last elements of iterables, etc.).

Proposal

To avoid these errors from happening, we could run the latest version of black over the whole codebase and/or pin its version.

@VMRuiz
Copy link
Collaborator

VMRuiz commented Feb 9, 2023

@kmike Suggested using pre-commit instead
Example from Scrapy: https://github.com/scrapy/scrapy/blob/master/.pre-commit-config.yaml

@rennerocha
Copy link
Collaborator

pre-commit is a good improvement into the project. I am using in all my current projects.
We can add a pre-commit run --all call in the build, so it will fail if the formatting (and other tests) fail, avoiding us to commit code that doesn't match.
Probably it will require one big commit to format the entire project once.

@VMRuiz
Copy link
Collaborator

VMRuiz commented Feb 9, 2023

The project is already formatted with Black, and only a few files needs to be reformatted with the new rules of black 23.1.0 so introducing this won't cause a huge diff.

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.

3 participants