Skip to content
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

gh-101100: Fix Sphinx warnings about list methods #127054

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

koyuki7w
Copy link
Contributor

@koyuki7w koyuki7w commented Nov 20, 2024

The list methods have no entries in the document, so removed these references.

Fixed 7 sphinx warnings:

library/collections.rst:784: WARNING: py:meth reference target not found: list.append [ref.meth]
library/collections.rst:784: WARNING: py:meth reference target not found: list.append [ref.meth]
tutorial/datastructures.rst:143: WARNING: py:meth reference target not found: list.append [ref.meth]
tutorial/datastructures.rst:143: WARNING: py:meth reference target not found: list.pop [ref.meth]
tutorial/datastructures.rst:342: WARNING: py:meth reference target not found: list.pop [ref.meth]
tutorial/datastructures.rst:495: WARNING: py:meth reference target not found: list.append [ref.meth]
tutorial/datastructures.rst:495: WARNING: py:meth reference target not found: list.extend [ref.meth]

📚 Documentation preview 📚: https://cpython-previews--127054.org.readthedocs.build/

@picnixz picnixz requested a review from AA-Turner November 21, 2024 05:36
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

List methods are not documented in a way that we can refer to them: https://docs.python.org/dev/library/stdtypes.html#mutable-sequence-types

@rhettinger rhettinger removed their request for review November 21, 2024 17:36
@hugovk hugovk added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Nov 24, 2024
@hugovk hugovk merged commit 3e81225 into python:main Dec 2, 2024
33 checks passed
@miss-islington-app
Copy link

Thanks @koyuki7w for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 2, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 2, 2024
@bedevere-app
Copy link

bedevere-app bot commented Dec 2, 2024

GH-127511 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Dec 2, 2024
@bedevere-app
Copy link

bedevere-app bot commented Dec 2, 2024

GH-127512 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Dec 2, 2024
@koyuki7w koyuki7w deleted the doc-fix-1 branch December 2, 2024 13:52
hugovk pushed a commit that referenced this pull request Dec 2, 2024
hugovk pushed a commit that referenced this pull request Dec 2, 2024
Comment on lines +145 to +146
item to the top of the stack, use :meth:`!~list.append`. To retrieve an item from the
top of the stack, use :meth:`!~list.pop` without an explicit index. For example::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change apparently broke the rendering, we don't want to display the tilde character. The exclamation mark should probably replace the tilde?

Zrzut ekranu 2024-12-6 o 11 52 28

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-aciek Thank you for pointing this out. I'll fix it soon.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it'd be good to detect this with the Sphinx Lint too. I reported it at:

sphinx-contrib/sphinx-lint#126

koyuki7w added a commit to koyuki7w/cpython that referenced this pull request Dec 6, 2024
The references starting with `!~` are not rendered correctly
(as pointed out in python#127054 (comment))
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 6, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 6, 2024
hugovk pushed a commit that referenced this pull request Dec 6, 2024
…H-127684) (#127692)

gh-101100: amend references starting with `!~` in gh-127054 (GH-127684)
(cherry picked from commit 77a61c0)

Co-authored-by: Yuki Kobayashi <[email protected]>
hugovk pushed a commit that referenced this pull request Dec 6, 2024
…H-127684) (#127693)

gh-101100: amend references starting with `!~` in gh-127054 (GH-127684)
(cherry picked from commit 77a61c0)

Co-authored-by: Yuki Kobayashi <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants