Skip to content

PEP 634: Fix duplicate labels - #2735

Merged
hugovk merged 2 commits into
python:mainfrom
hugovk:pep634-fix-duplicate-label-warnings
Jul 28, 2022
Merged

hugovk merged 2 commits into
python:mainfrom
hugovk:pep634-fix-duplicate-label-warnings

Conversation

@hugovk

@hugovk hugovk commented Jul 26, 2022 •

Copy link
Copy Markdown
Member

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/

@CAM-Gerlach CAM-Gerlach left a comment

Copy link
Copy Markdown
Member

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