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 inhowto/*
#127084
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
Removed sphinx roles of some classes and methods,as the classes are defined in the sample codes, not in Python.Fixed warnings:```howto/descriptor.rst:45: WARNING: py:class reference target not found: Ten [ref.class]howto/descriptor.rst:218: WARNING: py:class reference target not found: Person [ref.class]howto/descriptor.rst:218: WARNING: py:class reference target not found: Person [ref.class]howto/descriptor.rst:256: WARNING: py:class reference target not found: Person [ref.class]howto/descriptor.rst:340: WARNING: py:class reference target not found: Validator [ref.class]howto/descriptor.rst:363: WARNING: py:class reference target not found: Validator [ref.class]howto/descriptor.rst:363: WARNING: py:meth reference target not found: validate [ref.meth]howto/descriptor.rst:372: WARNING: py:class reference target not found: OneOf [ref.class]howto/descriptor.rst:374: WARNING: py:class reference target not found: Number [ref.class]howto/descriptor.rst:378: WARNING: py:class reference target not found: String [ref.class]howto/descriptor.rst:876: WARNING: py:class reference target not found: Field [ref.class]howto/descriptor.rst:1143: WARNING: py:func reference target not found: Property [ref.func]howto/descriptor.rst:1725: WARNING: py:class reference target not found: Object [ref.class]howto/enum.rst:78: WARNING: py:class reference target not found: Weekday [ref.class]howto/enum.rst:90: WARNING: py:class reference target not found: Weekday [ref.class]howto/enum.rst:113: WARNING: py:class reference target not found: Weekday [ref.class]howto/enum.rst:131: WARNING: py:class reference target not found: Weekday [ref.class]howto/enum.rst:576: WARNING: py:class reference target not found: Animal [ref.class]howto/enum.rst:893: WARNING: py:class reference target not found: FloatEnum [ref.class]```
Doc/howto/descriptor.rst Outdated
@@ -42,7 +42,7 @@ add new capabilities one by one. | |||
Simple example: A descriptor that returns a constant | |||
---------------------------------------------------- | |||
The:class:`Ten` class is a descriptor whose :meth:`__get__` method always | |||
The``Ten`` class is a descriptor whose :meth:`__get__` method always |
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.
If we keep theclass
role but add an exclamation mark then we keep the formatting of a class but don't try to resolve the reference, and get no warning:
The``Ten`` class is a descriptor whose:meth:`__get__` method always | |
The:class:`!Ten` class is a descriptor whose:meth:`!__get__` method always |
Re:https://devguide.python.org/documentation/markup/#roles
Same applies to the others in this PR.
And we can also do it for the example__get__
method here.
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.
@hugovk Fixed class references by using!
prefix.__get__
is documented inhttps://docs.python.org/3/reference/datamodel.html#object.__get__ , so I think it is better to fix__get__
to~object.__get__
.
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.
__get__
is documented indocs.python.org/3/reference/datamodel.html#object.get , so I think it is better to fix__get__
to~object.__get__
.
Yes, good idea.
howto/*
howto/*
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.
Thanks!
733fe59
intopython:mainUh oh!
There was an error while loading.Please reload this page.
(cherry picked from commit733fe59)Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Sorry,@koyuki7w and@hugovk, I could not cleanly backport this to
|
GH-127287 is a backport of this pull request to the3.13 branch. |
@koyuki7w Please could you take care of the 3.12 backport? Thanks! |
GH-127311 is a backport of this pull request to the3.12 branch. |
@hugovk Thanks. Opened 3.12 backport PR. |
Uh oh!
There was an error while loading.Please reload this page.
Removed sphinx roles of some classes and methods, as the classes are defined in the sample codes, not in Python.
Fixed warnings:
📚 Documentation preview 📚:https://cpython-previews--127084.org.readthedocs.build/