Lint on GitHub Actions via pre-commit#159
Merged
hugovk merged 1 commit intopython:mainfrom Oct 13, 2023
Merged
Conversation
Member
Author
|
I triggered a test run on https://github.com/python/python-docs-theme/actions/runs/6482294214/job/17601524907 Running the same command passes for me locally. |
| @@ -0,0 +1,2 @@ | |||
| [flake8] | |||
| max-line-length = 88 | |||
Member
There was a problem hiding this comment.
Can/should this specified with a --flag (or disabled if black already checks this)?
If we do we can get rid of this file.
Member
Author
There was a problem hiding this comment.
It could be done with a flag, but then it would only apply to that invocation with the flag, and not if we run Flake8 myself from the command line. This file means it is read by both.
We can't remove it either. Black will set some files to 88 chars wide, and then Flake8 would complain because it's over 80.
ezio-melotti
approved these changes
Oct 13, 2023
| @@ -0,0 +1,2 @@ | |||
| [flake8] | |||
| max-line-length = 88 | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add some pre-commit checks and apply autofixes. Also some minor config updates.
I also ran https://github.com/tox-dev/pyproject-fmt/ to reformat
pyproject.tomlto standardise it and make it much easier to compare with other repos. However, I didn't add it to pre-commit because it strips out the 3.13 classifier.