-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 typos discovered by codespell #18387
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I think codespell
would be a great addition. Little bit surprised that it didn't find any spelling issues in the changelog though 😄
@@ -100,6 +100,10 @@ force-exclude = ''' | |||
^/test-data | |||
''' | |||
|
|||
[tool.codespell] | |||
ignore-words-list = "ans,ccompiler,corus,fo,froms,haa,hax,notin,ot,statics,whet,zar" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.3.0 added inline ignores. We should probably use those for single occurrences like froms
.
# codespell:ignore froms
@@ -100,6 +100,10 @@ force-exclude = ''' | |||
^/test-data | |||
''' | |||
|
|||
[tool.codespell] | |||
ignore-words-list = "ans,ccompiler,corus,fo,froms,haa,hax,notin,ot,statics,whet,zar" | |||
skip = "./mypyc/external/*,*.pyi,*.test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do wonder if we should just skip the whole mypy/test/
and mypyc/test
folders entirely.
Personally I'd also just move the config to .pre-commit-config.yaml
directly. Don't think any one is ever running codespell outside pre-commit.
This also allows us to use the pre-commit files filter as well with exclude_types: [pyi, test]
and exclude: ^(mypyc/external/|mypy/test|mypyc/test)
.
Co-authored-by: Marc Mueller <[email protected]>
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
https://pypi.org/project/codespell