Skip to content
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

Add codespell support (config, workflow to detect/not fix) and make it fix few typos #278

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

yarikoptic
Copy link

More about codespell: https://github.com/codespell-project/codespell .

I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.

CI workflow has 'permissions' set only to 'read' so also should be safe.

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2 ./tox.ini ./docs/keyboard.rst",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
…agically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@avylove
Copy link
Collaborator

avylove commented Dec 13, 2024

Thank you for the pull request. What is the advantage of codespell over enabling the spell checking included in Pylint? In my own projects I use the spell checker in Pylint and it works well.

@yarikoptic
Copy link
Author

yarikoptic commented Dec 13, 2024

I never used spell checker in pylint, so can't really compare. Will check it out some time.

But what makes codespell "special" is that it is not doing full spell checking but rather detection and automated correction of most common typos only. Hence -- low false positive rate and ability to fix most of such typos automagically. Some folks even add codespell -w into their pre-commit configurations, but I am not that bold ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants