-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-42444: Use attribute directives in the docs for pathlib.PurePath #24977
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
bpo-42444: Use attribute directives in the docs for pathlib.PurePath #24977
Conversation
This patch might also fix https://bugs.python.org/issue38198 (attributes of pathlib classes are not being indexed in the Windows HTML Help). |
This PR is stale because it has been open for 30 days with no activity. |
@@ -339,7 +339,7 @@ Pure paths provide the following methods and properties: | |||
.. versionchanged:: 3.10 | |||
The parents sequence now supports :term:`slices <slice>` and negative index values. | |||
|
|||
.. data:: PurePath.parent | |||
.. attribute:: PurePath.parent |
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.
There's a link at line 1274 that also needs to be updated.
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.
Does it? References using mod, class, func, data, etc all look up their value in a unique namespace!
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 was thinking it's better to update for consistency and in case some tools now or in the future may indicate the type of link (or parse the link type and use it in some way). I agree the link still works and as far as our docs are concerned, it's a very minor nitpick and can be ignored.
@@ -368,7 +368,7 @@ Pure paths provide the following methods and properties: | |||
symlinks and eliminate `".."` components. | |||
|
|||
|
|||
.. data:: PurePath.name | |||
.. attribute:: PurePath.name |
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.
Same as above
@@ -384,7 +384,7 @@ Pure paths provide the following methods and properties: | |||
'' | |||
|
|||
|
|||
.. data:: PurePath.suffix | |||
.. attribute:: PurePath.suffix |
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.
same as above..
Left a couple of minor notes, otherwise LGTM. |
Thanks for the patch @ZackerySpytz. I've logged a new PR here that follows on from your work: #101114. |
https://bugs.python.org/issue42444