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

Spellchecker doesn't ignore labels and types in autodoc docstrings #10187

Open
Tracked by #6416
avylove opened this issue Jan 16, 2025 · 0 comments
Open
Tracked by #6416

Spellchecker doesn't ignore labels and types in autodoc docstrings #10187

avylove opened this issue Jan 16, 2025 · 0 comments
Labels
Enhancement ✨ Improvement to a component Needs PR This issue is accepted, sufficiently specified and now needs an implementation

Comments

@avylove
Copy link
Contributor

avylove commented Jan 16, 2025

Current problem

There are a few styles of these (Google, Numpy) but the project I'm working on uses a style like this. I guess this would be Sphinx style?

def func(argname1, argname2):
    '''
    :arg str argname1: Description of `argname1`
    :arg int OrderedDict: Description of `argname2`

    :rtype: str
    :returns: Description of return value.
    '''
    ...

arg, rtype, str all come up as spelling errors. Interestingly OrderedDict doesn't unless I specify it as collections.OrderedDict

The current workaround it to add these to the ignored words list or private dictionary, but that can potentially lead to masking other spelling errors. The bigger issue is this creates resistance to using the spell checker, especially with those who aren't used to it.

Desired solution

The spell checker should be able to recognize these cases and ignore them, but not ignore the the description text to the right. Potentially this could be configurable like spelling-ignore-comment-directives, but these styles don't change at the frequency of new tools being introduced.

Additional context

No response

@avylove avylove added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Jan 16, 2025
@Pierre-Sassoulas Pierre-Sassoulas added Enhancement ✨ Improvement to a component Needs PR This issue is accepted, sufficiently specified and now needs an implementation and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

No branches or pull requests

2 participants