8000 Display list names in Resolution and Discussions-To headers by AA-Turner · Pull Request #2361 · python/peps · GitHub
[go: up one dir, main page]

Skip to content

Display list names in Resolution and Discussions-To headers #2361

< 8000 div class="gh-header-actions mt-0 mb-3 mb-md-2 ml-1 flex-md-order-1 flex-shrink-0 d-flex flex-items-center gap-1">
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 4 commits into from
Feb 27, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Simplify
  • Loading branch information
AA-Turner committed Feb 27, 2022
commit 1621a058713e8da1852968d6b59c39efa118ba4c
14 changes: 3 additions & 11 deletions pep_sphinx_extensions/pep_processor/transforms/pep_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,19 @@ def apply(self) -> None:


def _pretty_thread(text: nodes.Text) -> nodes.Text:
# we want to keep these as lowercase:
if "python-dev" in text:
return nodes.Text("python-dev")
if "python-committers" in text:
return nodes.Text("python-committers")

parts = text.split("/")
parts = text.title().replace("Sig", "SIG").split("/")

# mailman structure is
# https://mail.python.org/archives/list/<list name>/thread/<id>
try:
list_name = parts[parts.index("archives") + 2].removesuffix("@python.org")
return nodes.Text(list_name.title().replace("Sig", "SIG").replace("-", " "))
return nodes.Text(parts[parts.index("Archives") + 2].removesuffix("@Python.Org"))
except ValueError:
pass

# pipermail structure is
# https://mail.python.org/pipermail/<list name>/<month-year>/<id>
try:
list_name = parts[parts.index("pipermail") + 1]
return nodes.Text(list_name.title().replace("Sig", "SIG").replace("-", " "))
return nodes.Text(parts[parts.index("Pipermail") + 1])
except ValueError:
# archives and pipermail not in list, e.g. PEP 245
return text
0