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

Improve typing docs #165

Merged
merged 2 commits into from
Nov 24, 2024
Merged

Improve typing docs #165

merged 2 commits into from
Nov 24, 2024

Conversation

alexfikl
Copy link
Collaborator

@alexfikl alexfikl commented Nov 23, 2024

I tried to figure out that weird sphinx error (because I hit it in pytential as well):

<unknown>:1: WARNING: py:class reference target not found: ExpressionNode [ref.class]

From what I can tell, the issue was in

.. currentmodule:: pymbolic.typing
.. autoclass:: Expression

where Expression contained an ExpressionNode. Sphinx got confused because it was looking for ExpressionNode in the current module set to pymbolic.typing and failing. No idea why it would look there.. maybe because the annotation is a string and it didn't have any choice? The exact same thing works for ArithmeticExpression because ExpressionNode is in the same module (I think?).

Anyways, adding a fake reference fixes that sort of issue

.. class:: ExpressionNode

	See :class:`pymbolic.ExpressionNode`

Besides that, I moved some docs around because for some reason Sphinx wasn't showing them..

pymbolic/typing.py Outdated Show resolved Hide resolved
@inducer inducer enabled auto-merge (rebase) November 24, 2024 20:29
@inducer
Copy link
Owner

inducer commented Nov 24, 2024

Thanks!

@inducer inducer disabled auto-merge November 24, 2024 20:53
@inducer inducer merged commit 8ca1648 into inducer:main Nov 24, 2024
11 checks passed
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