-
Notifications
You must be signed in to change notification settings - Fork 7
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
sphinx_autodoc_typehints errors on reST container
directive
#87
Comments
What version of Sphinx are you on now? I am using the ... and I haven't had trouble. One difference is I'm using the |
I stayed on Sphinx 5.3.0, too. Uqbar's constraint of <6 and >=5.3.0 made it clear to do. Thanks for that! I noticed uqbar is using the naked A strange clue is that it's only the first Once upon a time I had to temporarily change something in uqbar's call to |
Interesting. Definitely not seeing anything weird over here. What branch of Abjad are you building the docs on? I can try to reproduce when I have some free time. |
Cool. You can build on main, though I just merged in a manual workaround for all the docstrings in question. The workaround's ugly tho (strange to not be able to start a container with explanatory text), so if you do find something that'd be awesome. To reproduce, just type "foo:" inside any Hmm, actually, I guess if you go try that and the error isn't reproducible, then I suppose it's just something to do with the config of my venv. Lemme know if it's even reproducible on your machine. |
Exactly as you said two years ago, this didn't have anything to with uqbar. Turns out that the Sphinx I added the current version of the bug to their tracker as #513: tox-dev/sphinx-autodoc-typehints#513 Thanks for the previous help thinking through this one through. It took me a while to track it down! |
container
directive
@trevorbaca Glad to hear you found the cause. You might want to look at Sphinx's built-in type hint rendering. Perhaps you can ditch the extension. https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_typehints |
@josephine-wolf-oberholtzer Works beautifully; thanks! While we're here, I was having drama with https://github.com/jurasofish/sphinx-toggleprompt/blob/develop/setup.py ... which I think explains it. Turns out The extension hadn't been upgraded in about a year. Though it looks like the package author may be releasing new versions as of today ... https://github.com/jurasofish/sphinx-toggleprompt/releases ... so maybe the constraint will change soon. |
Sometime after January 14 (Abjad 3.15) and yesterday, Sphinx started to issue an ERROR/WARNING pair for every
.. container:: example
directive that's followed by explanatory text (rather than by example Python code).So Sphinx errors on this (explanatory text immediately after container directive):
But Sphinx is happy with this (explanatory text hoisted outside of container directive):
Are you seeing anything similar? Is there any chance this has to do with uqbar? It's possible the problem could be Sphinx itself, or black. But I can't figure it out.
It seems like these same errors should be occurring when building uqbar's own docs, at ...
https://github.com/josiah-wolf-oberholtzer/uqbar/blob/42b24f7917d2b2078e44cf184d9e45adf5d091d5/uqbar/book/console.py#L86
https://github.com/josiah-wolf-oberholtzer/uqbar/blob/42b24f7917d2b2078e44cf184d9e45adf5d091d5/uqbar/book/console.py#L104
https://github.com/josiah-wolf-oberholtzer/uqbar/blob/42b24f7917d2b2078e44cf184d9e45adf5d091d5/uqbar/book/console.py#L122
... for example.
For reference, Sphinx's error output on Abjad's API looks like this:
The text was updated successfully, but these errors were encountered: