Closed NMertsch closed 1 year ago
The spelling checker doesn't have any special handling for docstrings. What is causing the docstring for that method to be included in the documentation set? Is it possible that the autodoc module is adding some default content to the doctree when it does not find explicit details about the return value?
Thank you for the context, I created the issue in this repo because the error was reported during sphinx-build [...] -b spelling
.
The docstring was included via .. autoprotocol:: toga.app.WindowContentProvider
here, provided by the sphinx_toolbox.more_autodoc.autoprotocol extension.
The spelling checker just processes the nodes that Sphinx creates, asking each to turn itself into text and then processing the resulting tokens to see if they are in the dictionary. It doesn't have any control over how a node represents itself.
Perhaps the autodoc code is automatically adding an rtype
value to the text, either in the plugin you linked to or in the underlying code that comes from Sphinx. You could try a plaintext build to see what the output looks like.
Thank you for again. I don't have the time to investigate it in the next days, though. Feel free to close it, since it most likely is an issue with another plugin.
Closing since this is not a bug in the spelling checker.
@NMertsch if you do find a useful way to work around this that could be done in the spelling checker, let me know and we can see about bringing that logic into this repo.
(Sorry for not providing a simple reproducible example, after running into dll issues I gave up.)
The following is fine:
The following is raising an error (difference:
:return:
is missing):Error message:
This error message was not helpful: There is no misspelling, and there is no
rtype
. I have no clue why the code triggers an error.The error occurred during an rtd-triggered build.