Skip to content

Commit ee01a9c

Browse files
committed
Infra: prettify Pep->PEP like Sig->SIG
1 parent ad0ba48 commit ee01a9c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pep_sphinx_extensions/pep_processor/transforms/pep_headers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _process_pretty_url(url: str) -> tuple[str, str]:
205205
except KeyError as error:
206206
raise ValueError(
207207
f"{url} not a link to a recognized domain to prettify") from error
208-
item_name = item_name.title().replace("Sig", "SIG")
208+
item_name = item_name.title().replace("Sig", "SIG").replace("Pep", "PEP")
209209
return item_name, item_type
210210

211211

pep_sphinx_extensions/tests/pep_processor/transform/test_pep_headers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_generate_list_url(test_input, expected):
4747
),
4848
(
4949
"https://discuss.python.org/c/peps/",
50-
("Peps Discourse", "category"),
50+
("PEPs Discourse", "category"),
5151
),
5252
],
5353
)
@@ -104,7 +104,7 @@ def test_process_pretty_url_invalid(test_input, expected):
104104
),
105105
(
106106
"https://discuss.python.org/c/peps/",
107-
"Peps Discourse category",
107+
"PEPs Discourse category",
108108
),
109109
],
110110
)

0 commit comments

Comments
 (0)