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

Have spellchecker ignore code in docstring or comments (i.e. things flanked with double backticks) #4319

Closed
eli88fine opened this issue Apr 8, 2021 · 3 comments · Fixed by #4330
Labels
Enhancement ✨ Improvement to a component

Comments

@eli88fine
Copy link
Contributor

eli88fine commented Apr 8, 2021

Is your feature request related to a problem? Please describe

When I run the spellchecker, I have comments like

The .qsize() method requires that blah blah blah

The spellchecker raises an error saying qsize is not a word. I would prefer not to have to add all these things into the 'words to ignore' dictionary, as I really only want qsize to be allowed if I explicitly flank it with backticks to indicate that it is code...if I accidentally typed qsize instead of size in a comment I would still want that flagged. I also don't want to have to disable pylint spellchecking for that whole line of comment or the whole docstring.

Describe the solution you'd like

Anything flanked in backticks should be ignored by the spellchecker (a likely easy implementation would be to add another filter like is already in place for Sphinx directives).

Would you be open to a PR to address this?

@eli88fine eli88fine changed the title Have spellchecker ignore code in docstring in comments (i.e. things flanked with double backticks) Have spellchecker ignore code in docstring or comments (i.e. things flanked with double backticks) Apr 8, 2021
@Pierre-Sassoulas Pierre-Sassoulas added the Enhancement ✨ Improvement to a component label Apr 8, 2021
@Pierre-Sassoulas
Copy link
Member

Thank you for opening the issue :) ! I think this would make a lot of sense.

@eli88fine
Copy link
Contributor Author

Should it require double backticks on each side? or should it be more open, and anything flanked in either single or double backticks be considered code?

@Pierre-Sassoulas
Copy link
Member

Markdown require a single backtick and rst double backticks, so I think it's ok to permit both.

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

Successfully merging a pull request may close this issue.

2 participants