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 #573

Open
wants to merge 3 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.

You barely had any typos (well done!) so feel free to ignore/close this PR -- was not much effort.

…agically

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

mgeier commented Dec 7, 2024

Thanks for this PR!

I'm a bit torn, though. On the one hand, I like using automation to fix errors, but OTOH I'm worried about the UX regarding false positives.

There is already one false positive that has to be handled, and one case that is arguable (see codespell-project/codespell#3521 and https://github.com/sphinx-doc/sphinx/pull/13113/files#diff-5ac55e1c4199fe776eedaf542c066d6b3ff665c930c565c860e9b4710704a8cd). This leaves just a single uncontested error.

This makes me think that the probability of false positives appearing in the future is quite high. Handling those would probably be annoying for potential contributors.

That's what I like about https://pep8speaks.org/: it makes it easy to ignore suggestions (it doesn't cause CI to fail) and it only makes suggestions for the lines that were actually changed in a given PR. I guess that is not possible with codespell, right?

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