mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Update PEP links in docs
This commit is contained in:
@@ -5,7 +5,7 @@ In the :ref:`previous section <tutorial-describing-objects>` of the tutorial
|
||||
you manually documented a Python function in Sphinx. However, the description
|
||||
was out of sync with the code itself, since the function signature was not
|
||||
the same. Besides, it would be nice to reuse `Python
|
||||
docstrings <https://www.python.org/dev/peps/pep-0257/#what-is-a-docstring>`_
|
||||
docstrings <https://peps.python.org/pep-0257/#what-is-a-docstring>`_
|
||||
in the documentation, rather than having to write the information in two
|
||||
places.
|
||||
|
||||
|
||||
@@ -662,7 +662,7 @@ There are also config values that you can set:
|
||||
|
||||
...
|
||||
|
||||
.. __: https://www.python.org/dev/peps/pep-0563/
|
||||
.. __: https://peps.python.org/pep-0563/
|
||||
.. __: https://mypy.readthedocs.io/en/latest/kinds_of_types.html#type-aliases
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ a comma-separated list of group names.
|
||||
* ``===``: Arbitrary equality clause.
|
||||
|
||||
``pyversion`` option is followed `PEP-440: Version Specifiers
|
||||
<https://www.python.org/dev/peps/pep-0440/#version-specifiers>`__.
|
||||
<https://peps.python.org/pep-0440/#version-specifiers>`__.
|
||||
|
||||
.. versionadded:: 1.6
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ def function_with_types_in_docstring(param1, param2):
|
||||
bool: The return value. True for success, False otherwise.
|
||||
|
||||
.. _PEP 484:
|
||||
https://www.python.org/dev/peps/pep-0484/
|
||||
https://peps.python.org/pep-0484/
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ def function_with_types_in_docstring(param1, param2):
|
||||
True if successful, False otherwise.
|
||||
|
||||
.. _PEP 484:
|
||||
https://www.python.org/dev/peps/pep-0484/
|
||||
https://peps.python.org/pep-0484/
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ the documentation, so it doesn't modify any of the docstrings in your actual
|
||||
source code files.
|
||||
|
||||
.. _ReStructuredText: https://docutils.sourceforge.io/rst.html
|
||||
.. _docstrings: https://www.python.org/dev/peps/pep-0287/
|
||||
.. _docstrings: https://peps.python.org/pep-0287/
|
||||
.. _Google Python Style Guide:
|
||||
https://google.github.io/styleguide/pyguide.html
|
||||
.. _Google:
|
||||
@@ -267,9 +267,9 @@ Google style with types in docstrings::
|
||||
`Python 2/3 compatible annotations`_ aren't currently
|
||||
supported by Sphinx and won't show up in the docs.
|
||||
|
||||
.. _PEP 484: https://www.python.org/dev/peps/pep-0484/
|
||||
.. _PEP 526: https://www.python.org/dev/peps/pep-0526/
|
||||
.. _Python 2/3 compatible annotations: https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code
|
||||
.. _PEP 484: https://peps.python.org/pep-0484/
|
||||
.. _PEP 526: https://peps.python.org/pep-0526/
|
||||
.. _Python 2/3 compatible annotations: https://peps.python.org/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code
|
||||
|
||||
|
||||
Configuration
|
||||
|
||||
@@ -1661,7 +1661,7 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
|
||||
if not self.doc_as_attr and self.options.show_inheritance:
|
||||
if inspect.getorigbases(self.object):
|
||||
# A subclass of generic types
|
||||
# refs: PEP-560 <https://www.python.org/dev/peps/pep-0560/>
|
||||
# refs: PEP-560 <https://peps.python.org/pep-0560/>
|
||||
bases = list(self.object.__orig_bases__)
|
||||
elif hasattr(self.object, '__bases__') and len(self.object.__bases__):
|
||||
# A normal class
|
||||
|
||||
@@ -41,7 +41,7 @@ def is_allowed_version(spec: str, version: str) -> bool:
|
||||
"""Check `spec` satisfies `version` or not.
|
||||
|
||||
This obeys PEP-440 specifiers:
|
||||
https://www.python.org/dev/peps/pep-0440/#version-specifiers
|
||||
https://peps.python.org/pep-0440/#version-specifiers
|
||||
|
||||
Some examples:
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ def split_full_qualified_name(name: str) -> Tuple[Optional[str], str]:
|
||||
"""Split full qualified name to a pair of modname and qualname.
|
||||
|
||||
A qualname is an abbreviation for "Qualified name" introduced at PEP-3155
|
||||
(https://www.python.org/dev/peps/pep-3155/). It is a dotted path name
|
||||
(https://peps.python.org/pep-3155/). It is a dotted path name
|
||||
from the module top-level.
|
||||
|
||||
A "full" qualified name means a string containing both module name and
|
||||
|
||||
Reference in New Issue
Block a user