-
Notifications
You must be signed in to change notification settings - Fork 27
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
No Hyperlinks for Pydantic Types #27
Comments
Thanks for the bug report. I could reproduce the issue myself using the |
@tahoward The bug was related to how typed field references work. They always use the Before merging the related PR, it would be great if you could test the bug fix on your site to confirm that my test case did indeed capture the incorrect behavior which you've encountered. To do so, please install the current dev release in your doc-building-environment via |
I have this problem too, it turns out - just tried with that release and no dice, unfortunately. |
@StephenHogg thanks for joining the conversation. I just rechecked if I accidentally messed up the conf.py
test.py from pydantic import BaseModel
class TestClass:
"""Test
Attributes:
model (TestModel): Model
"""
def __init__(self):
self.model = TestModel()
class TestModel(BaseModel):
pass index.rst
The generated doc strings contains the a link from the doc string body of You've might come across a different issue here. If that's the case, please provide a minimal working example. The above code should at least work on your machine as it is (with sphinx 4.1.2 & pydantic 1.8.2), too. To ensure you have the correct version of |
My apologies, the problem I'm having appears to be because of the recursive autosummary thing. |
No worries, now we know your issue is related to autosummary. Perhaps you could describe it in more detail in #33 if it provides any more insight. |
@mansenfranzen Thanks for looking into this I'll pull in dev release and see what output looks like. |
@mansenfranzen I seem to be unable to replicate the original issue on your |
@tahoward I can still reproduce the issue even with sphinx 4.1.2. The hyperlink does not show up in |
@mansenfranzen Agreed! |
Running Sphinx
4.1.1
and pydantic1.8.2
.Enabled extensions:
Sample:
The generated document will not have a hyperlink for the
TestModel
data type reference. Removing theBaseModel
class fromTestModel
renders the type references with hyperlinks again.The text was updated successfully, but these errors were encountered: