Skip to content

PEP 634: Fix duplicate labels #2735

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

Merged
merged 2 commits into from
Jul 28, 2022

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jul 26, 2022

Fix these warnings (like we did in #2718):

pep-0634.rst:140: WARNING: duplicate label guards, other instance in pep-0622.rst
pep-0634.rst:175: WARNING: duplicate label patterns, other instance in pep-0622.rst
pep-0634.rst:231: WARNING: duplicate label literal_pattern, other instance in pep-0622.rst
pep-0634.rst:267: WARNING: duplicate label capture_pattern, other instance in pep-0622.rst
pep-0634.rst:290: WARNING: duplicate label wildcard_pattern, other instance in pep-0622.rst
pep-0634.rst:337: WARNING: duplicate label sequence_pattern, other instance in pep-0622.rst
pep-0634.rst:417: WARNING: duplicate label mapping_pattern, other instance in pep-0622.rst
pep-0634.rst:472: WARNING: duplicate label class_pattern, other instance in pep-0622.rst
pep-0634.rst:598: WARNING: duplicate label appendix a, other instance in pep-0622.rst

Sphinx treats labels as "global" in the whole docs scope, not at the level of individual documents. So let's use a unambiguous label prefixed with the PEP number, similar to PEP 639 / https://raw.githubusercontent.com/python/peps/main/pep-0639.rst

We still get similar anchors like #guards:


Also remove redundant emacs metadata.

Preview

https://pep-previews--2735.org.readthedocs.build/pep-0634/

Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @hugovk

@hugovk hugovk merged commit cf3b2e1 into python:main Jul 28, 2022
@hugovk hugovk deleted the pep634-fix-duplicate-label-warnings branch July 28, 2022 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants