-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[pre-commit] Add codespell, and fix some existing typos #9912
[pre-commit] Add codespell, and fix some existing typos #9912
Conversation
This comment has been minimized.
This comment has been minimized.
@@ -7,6 +7,9 @@ repos: | |||
hooks: | |||
- id: trailing-whitespace | |||
exclude: tests(/\w*)*/functional/t/trailing_whitespaces.py|tests/pyreverse/data/.*.html|doc/data/messages/t/trailing-whitespace/bad.py | |||
# - id: file-contents-sorter # commented out because it does not preserve comments order |
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.
Should we just not add it then?
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.
It's still useful to sort it and then git add -p
the changes.
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.
Yeah but I don't think we should be committing code that is commented out to main
right?
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.
It prevents us from having to recreate the sorting from zero every time we want to sort the file, Is there any downside apart from the file being a little longer ?
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.
Hmm I think it looks a bit sloppy to have code that you don't intend to use, but I guess it is fine?
functiondef | ||
functiΓΈn |
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.
What? haha
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.
Yeah should probably remove that instead of sorting it alphabetically π .
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.
It's used extensively in the unittest for non ascii name
# tests/functional/m/member/member_checks.py: | ||
# - typos are voluntary to create credible 'no-member' | ||
|
||
skip = """ |
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.
There is no way to do inline ignores?
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.
Not in codespell (make sense as it's used in documentation mainly)
00dd41f
to
58a3dfb
Compare
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## main #9912 +/- ##
=======================================
Coverage 95.80% 95.80%
=======================================
Files 174 174
Lines 18933 18933
=======================================
Hits 18139 18139
Misses 794 794
|
π€ Effect of this PR on checked open source code: π€ Effect on astroid:
The following messages are no longer emitted:
Effect on home-assistant:
The following messages are no longer emitted:
Effect on poetry-core:
The following messages are no longer emitted:
Effect on black:
The following messages are no longer emitted:
Effect on music21:
This comment was truncated because GitHub allows only 65536 characters in a comment. This comment was generated for commit 58a3dfb |
Type of Changes
Description
Pylint's own checker checks only python files and not other files (rst/md), it also does not check the content of strings inside the code, thus a bunch of new existing typos fixes were made.