Skip to content

Exclude lock files and don't just write changes#207

Closed
paddyroddy wants to merge 5 commits intomainfrom
fix-codespell-update-lock
Closed

Exclude lock files and don't just write changes#207
paddyroddy wants to merge 5 commits intomainfrom
fix-codespell-update-lock

Conversation

@paddyroddy
Copy link
Member

@paddyroddy paddyroddy commented Oct 25, 2023

It is recommended to run the -w flag with also the -i flag https://github.com/codespell-project/codespell/blob/cb4dbe1c34911772d81b748db4c011e96ec3b54b/README.rst?plain=1#L58. I don't know how this would play with pre-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 rouge https://github.com/rouge-ruby/rouge.

I've also added codespell into the cookied repo - to keep consistent with other pre-commit hooks.

I've also updated the Gemfile.lock file - and excluded that from codespell.

I've also changed the YAMLs to a new way I prefer

@paddyroddy paddyroddy added bug Something isn't working enhancement New feature or request labels Oct 25, 2023
@paddyroddy paddyroddy self-assigned this Oct 25, 2023
@samcunliffe
Copy link
Member

rev: v2.2.6
hooks:
- id: codespell
args: [--write-changes]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samcunliffe they key is to just not have this line. I've used it in UCL-MIRSG repos recently to great effect.

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-changes option and excluding the lock file
  • Removing numpy and pydantic from the mypy hook
  • Adding codespell to the package template (as opposed to just using it to lint this repository)

@paddyroddy
Copy link
Member Author

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:

Overkill but sure

@paddyroddy
Copy link
Member Author

Closing in favour of #210, #211, #212, #213. Have given up updating the Gemfile.lock as that is enough PRs as it is.

@paddyroddy paddyroddy closed this Oct 26, 2023
@paddyroddy paddyroddy deleted the fix-codespell-update-lock branch October 26, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants