-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add codespell to micropython-lib. #1065
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
base: master
Are you sure you want to change the base?
Conversation
d620d98 to
90abb4f
Compare
d108cc8 to
09160fd
Compare
pyproject.toml
Outdated
| [tool.codespell] | ||
| count = "" | ||
| ignore-regex = '\b[A-Z]{3}\b' | ||
| ignore-words-list = "ans,asend,deques,dout,emac,extint,hsi,iput,mis,notin,numer,ser,shft,synopsys,technic,ure,curren,te,bu,curch,ist,clen,henc,shttp,unstall,ody" |
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 suggest trimming this list of ignore words down to the bare minimum needed by this repo. A lot of these words are unique to the main repo, and it's best not to ignore them here. (That way, we catch more spelling mistakes.)
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 have trimmed down the list and moved the wordlist into tools/ignore_words.txt
one word per line , Should help on the tracking changes going forward.
reduced further by adding # codespell:ignore comments for lower frequency cases
pyproject.toml
Outdated
| skip = """ | ||
| ./.git,\ | ||
| **/test_*.py,\ | ||
| **/html.entities/html/entities.py,\ |
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's the reason the tests and this entities file need to be skipped?
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.
As mentioned in the PR :
- paths adjusted - ignores tests_*.py and html/entities as they have many non-words.
I have now added a configuration to enable disable codespell for blocks of code where it is impractical to repeat on each line.
# This wil be checked
# codespell:ignore-begin
# this won't
# codespell:ignore-endtests_
In my earlier validation I found a lot of problems in the tests so decided to exclude all together
now on second look , there were only a few remaining - some of which i fixed and a few that I added # ignores for
Signed-off-by: Jos Verlinde <Jos.Verlinde@Microsoft.com>
Spelling preferences based on codespell configuration. Signed-off-by: Jos Verlinde <Jos.Verlinde@Microsoft.com>
09160fd to
3cee61c
Compare
Add the codespell configuration based on the micropython/micropython repo.
this was triggered by recent fixes and a comment from Damien
Codespell configuration with:
tools/ignore_words.txtGitHub action runs on Push and PR
runs codespell on commit.
3rd commit is the only code change. Therequestsmodule has a typo in the name a a variable (formated-->formatted)While this is a minor code change I did bump the version for that module.Example:
Testing
Tested locally and in CI
Labeled as Docs- as there is no 🔨tools label