-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
DOC: Fix NaT and NA API docs #62313
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
DOC: Fix NaT and NA API docs #62313
Conversation
…s message Set __module__ = 'pandas' on NaTType and NAType to fix incorrect autodoc 'alias of' messages. Closes pandas-dev#62185.
Fixes Sphinx autodoc showing circular 'alias of' references for pandas.NA and pandas.NaT by explicitly setting their __module__ attribute to 'pandas'. Closes pandas-dev#62185
Hi @rhshadrach, I've implemented your suggested fix by adding Would you be able to review this PR when you have a chance? Thanks for identifying the root cause and providing the solution direction. |
/docbuild |
/preview |
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/62313/ |
@meet-vasita thanks for the PR. i'm not seeing any difference at https://pandas.pydata.org/preview/pandas-dev/pandas/62313/docs/reference/api/pandas.NA.html or https://pandas.pydata.org/preview/pandas-dev/pandas/62313/docs/reference/api/pandas.NaT.html |
Thanks @meet-vasita and @simonjayhawkins - I think the remaining issue is that
and
But there is the less-than desired effect of having the class show up in the API page. Open to thoughts here. |
@rhshadrach I'm out of my depth on Sphinx, but the SO page you linked had these comments - do they help?
|
@wjandrea - no, we'd still face the issue I identified in my previous comment. |
Since this worked fine in the past, this might be caused by c8e7a98, which while deduplicating the entry also added a Testing it out locally, removing that line from |
(and we can keep the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks @meet-vasita! |
You’re welcome @rhshadrach, I’m glad it was helpful. |
Co-authored-by: Richard Shadrach <[email protected]>
Set
__module__ = "pandas"
on NaTType and NAType to fix incorrect autodoc "alias of" messages.Closes #62185.