Exclude lock files and don't just write changes#207
Closed
paddyroddy wants to merge 5 commits intomainfrom
Closed
Conversation
paddyroddy
commented
Oct 25, 2023
paddyroddy
commented
Oct 25, 2023
| rev: v2.2.6 | ||
| hooks: | ||
| - id: codespell | ||
| args: [--write-changes] |
Member
Author
There was a problem hiding this comment.
@samcunliffe they key is to just not have this line. I've used it in UCL-MIRSG repos recently to great effect.
dstansby
requested changes
Oct 26, 2023
Member
dstansby
left a comment
There was a problem hiding this comment.
I think there's a few orthogonal changes, each of which deseerve their own PR so we don't get lost and to make them easier to review:
- Reformatting the
yaml - Removing the
--write-changesoption and excluding the lock file - Removing
numpyandpydanticfrom the mypy hook - Adding
codespellto the package template (as opposed to just using it to lint this repository)
Member
Author
Overkill but sure |
This was referenced Oct 26, 2023
Merged
Member
Author
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.
It is recommended to run the
-wflag with also the-iflag https://github.com/codespell-project/codespell/blob/cb4dbe1c34911772d81b748db4c011e96ec3b54b/README.rst?plain=1#L58. I don't know how this would play withpre-commit, I'm tempted to remove these flags fully.Reason being is that in #83 that this got changed https://github.com/UCL-ARC/python-tooling/pull/200/files#r1371562344 to something that it shouldn't. I've checked, and it is definitely
rougehttps://github.com/rouge-ruby/rouge.I've also added
codespellinto the cookied repo - to keep consistent with otherpre-commithooks.I've also updated the
Gemfile.lockfile - and excluded that fromcodespell.I've also changed the YAMLs to a new way I prefer