Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7829376

Browse files
committedMar 5, 2025·
Change links from typing.readthedocs.io to typing.python.org
1 parent 62f7e19 commit 7829376

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed
 

‎pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py

+11-13
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from docutils.parsers import rst
77

88
PYPA_SPEC_BASE_URL = "https://packaging.python.org/en/latest/specifications/"
9-
TYPING_SPEC_BASE_URL = "https://typing.readthedocs.io/en/latest/spec/"
9+
TYPING_SPEC_BASE_URL = "https://typing.python.org/en/latest/spec/"
1010

1111

1212
class PEPBanner(rst.Directive):
@@ -26,16 +26,16 @@ class PEPBanner(rst.Directive):
2626
css_classes = []
2727

2828
def run(self) -> list[nodes.admonition]:
29-
3029
if self.arguments:
3130
link_content = self.arguments[0]
32-
pre_text = self.admonition_pre_template.format(
33-
link_content=link_content)
31+
pre_text = self.admonition_pre_template.format(link_content=link_content)
3432
else:
3533
pre_text = self.admonition_pre_text
3634

37-
close_button_node = nodes.paragraph('', '', nodes.Text('×'), classes=['close-button'])
38-
close_button_node['classes'].append('close-button')
35+
close_button_node = nodes.paragraph(
36+
"", "", nodes.Text("×"), classes=["close-button"]
37+
)
38+
close_button_node["classes"].append("close-button")
3939

4040
pre_text_node = nodes.paragraph(pre_text)
4141
pre_text_node.line = self.lineno
@@ -50,13 +50,13 @@ def run(self) -> list[nodes.admonition]:
5050

5151
source_lines = [pre_text] + list(self.content or []) + [post_text]
5252
admonition_node = self.admonition_class(
53-
"\n".join(source_lines), classes=["pep-banner"] + self.css_classes)
53+
"\n".join(source_lines), classes=["pep-banner"] + self.css_classes
54+
)
5455

5556
admonition_node.append(pre_text_node)
5657
admonition_node.append(close_button_node)
5758
if self.content:
58-
self.state.nested_parse(
59-
self.content, self.content_offset, admonition_node)
59+
self.state.nested_parse(self.content, self.content_offset, admonition_node)
6060
admonition_node.append(post_text_node)
6161

6262
return [admonition_node]
@@ -74,9 +74,7 @@ class CanonicalDocBanner(PEPBanner):
7474
"This PEP is a historical document. "
7575
"The up-to-date, canonical documentation can now be found elsewhere."
7676
)
77-
admonition_post_text = (
78-
"See :pep:`1` for how to propose changes."
79-
)
77+
admonition_post_text = "See :pep:`1` for how to propose changes."
8078
css_classes = ["canonical-doc", "sticky-banner"]
8179

8280

@@ -113,7 +111,7 @@ class CanonicalTypingSpecBanner(PEPBanner):
113111
admonition_pre_text = admonition_pre_template
114112
admonition_post_text = (
115113
"See the `typing specification update process "
116-
"<https://typing.readthedocs.io/en/latest/spec/meta.html>`__ "
114+
"<https://typing.python.org/en/latest/spec/meta.html>`__ "
117115
"for how to propose changes to the typing spec."
118116
)
119117
css_classes = ["canonical-typing-spec", "sticky-banner"]

‎peps/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"py3.14": ("https://docs.python.org/3.14/", None),
7676
"python": ("https://docs.python.org/3/", None),
7777
"trio": ("https://trio.readthedocs.io/en/latest/", None),
78-
"typing": ("https://typing.readthedocs.io/en/latest/", None),
78+
"typing": ("https://typing.python.org/en/latest/", None),
7979
}
8080
intersphinx_disabled_reftypes = []
8181

‎peps/pep-0012.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ You can use
656656
to other Sphinx sites,
657657
such as the `Python documentation <https://docs.python.org/>`_
658658
`packaging.python.org <https://packaging.python.org/>`_,
659-
and `typing.readthedocs.io <https://typing.readthedocs.io/>`_,
659+
and `typing.python.org <https://typing.python.org/>`_,
660660
to easily cross-reference pages, sections and Python/C objects.
661661

662662
For example,

0 commit comments

Comments
 (0)
Please sign in to comment.