Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-101100: fix sphinx warnings in reference/datamodel.rst#114280
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -885,7 +885,7 @@ Predefined (writable) attributes: | |||
:attr:`__name__` | |||
The module's name. | |||
:attr:`__doc__` | |||
:attr:`~definition.__doc__` |
AlexWaygoodJan 19, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
I'd prefer to fix these warnings by creating a single canonical table in the datamodel docs, and removing duplicated documentation elsewhere: see#101100 (comment) (and see PRs where I did similar things for other lists like this in this document:#112781,#112735,#112832,#112933)
Uh oh!
There was an error while loading.Please reload this page.
@@ -5492,6 +5492,17 @@ types, where they are relevant. Some of these are not reported by the | |||
The tuple of base classes of a class object. | |||
.. attribute:: definition.__module__ |
AlexWaygoodJan 19, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
In my opinion, the attributes listed here should only be attributes such as__dict__
and__class__
that appear onall Python objects (I'm aware that's not currently the case, but that's a problem, in my opinion).
We already have a dedicated reference for the__module__
attribute on function objects; I think we should do the same for the__module__
attribute on class objects:https://docs.python.org/3/reference/datamodel.html#function.__module__ (ditto for__doc__
)
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
AlexWaygood commentedJan 19, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Suggestion: you may want to consider separate PRs for tackling warnings relating to module attributes and those relating to class attributes. Fixing the Sphinx nitpicks in the datamodel docs in a principled way is not trivial -- I've been picking away at them for a while, in#112737,#112781,#112735,#112832,#112933, etc. :) Keeping the PRs small will make it easier for us to review your PRs, and make it easier for you to address our feedback. I haven't as much time to work on it right now, so it's great some other people are getting involved! |
Directive |
#114336 - is a set/frozenset issue. |
Uh oh!
There was an error while loading.Please reload this page.
📚 Documentation preview 📚:https://cpython-previews--114280.org.readthedocs.build/