Infra + many PEPs: Add Sphinx Lint and fix errors (#2816)

* PEP 555, 653: Fix inline literal missing (escaped) space after literal

* Add newline at end of file

* PEP 692: Add newline at end of file

* PEP 633: Fix missing space before role

* Run sphinx-lint in pre-commit

* PEP 639: Remove rogue backticks

* PEP 372: Remove rogue backticks

* PEP 462: Add missing underscore after closing backtick in hyperlink

* PEP 481: Add missing underscore after closing backtick in hyperlinks

* PEP 507: Add missing underscore after closing backtick in hyperlinks

* PEP 453: Add missing underscore after closing backtick in hyperlinks, and convert to links

* PEP 534: Fix inline literal missing (escaped) space after literal

* PEP 372, 453, 462: Redirect BPO to GH
This commit is contained in:
Hugo van Kemenade 2022-10-06 12:14:32 -07:00 committed by GitHub
parent 6fe23c94f9
commit 7fa80c34d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 53 additions and 150 deletions

View File

@ -12,7 +12,7 @@ default_stages: [commit]
repos:
# General file checks and fixers
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.3.0
hooks:
- id: mixed-line-ending
name: "Normalize mixed line endings"
@ -66,6 +66,15 @@ repos:
- id: tox-ini-fmt
name: "Format tox.ini"
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v0.6.1
hooks:
- id: sphinx-lint
name: "Sphinx lint"
# Temporarily disable "role-with-double-backticks" due to false positive:
# https://github.com/sphinx-contrib/sphinx-lint/issues/34
args: ["--disable=role-with-double-backticks,trailing-whitespace"]
# RST checks
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0

View File

@ -1,7 +1,5 @@
PEP: 372
Title: Adding an ordered dictionary to collections
Version: $Revision$
Last-Modified: $Date$
Author: Armin Ronacher <armin.ronacher@active-4.com>,
Raymond Hettinger <python@rcn.com>
Status: Final
@ -27,7 +25,7 @@ Patch
A working Py3.1 patch including tests and documentation is at:
`OrderedDict patch <http://bugs.python.org/issue5397>`_
`OrderedDict patch <https://github.com/python/cpython/issues/49647>`_
The check-in was in revisions: 70101 and 70102
@ -148,7 +146,7 @@ constructor?
Is the ordered dict a dict subclass? Why?
Yes. Like ``defaultdict``, an ordered dictionary `` subclasses ``dict``.
Yes. Like ``defaultdict``, an ordered dictionary subclasses ``dict``.
Being a dict subclass make some of the methods faster (like
``__getitem__`` and ``__len__``). More importantly, being a dict
subclass lets ordered dictionaries be usable with tools like json that
@ -197,7 +195,7 @@ How well does OrderedDict work with the json module, PyYAML, and ConfigParser?
In Py2.6, the object_hook for json decoders passes-in an already built
dictionary so order is lost before the object hook sees it. This
problem is being fixed for Python 2.7/3.1 by adding a new hook that
preserves order (see http://bugs.python.org/issue5381 ).
preserves order (see https://github.com/python/cpython/issues/49631 ).
With the new hook, order can be preserved::
>>> jtext = '{"one": 1, "two": 2, "three": 3, "four": 4, "five": 5}'
@ -264,7 +262,7 @@ Reference Implementation
An implementation with tests and documentation is at:
`OrderedDict patch <http://bugs.python.org/issue5397>`_
`OrderedDict patch <https://github.com/python/cpython/issues/49647>`_
The proposed version has several merits:
@ -308,21 +306,10 @@ of the source file.
References
==========
.. [1] http://bugs.python.org/issue1371075
.. [1] https://github.com/python/cpython/issues/42649
Copyright
=========
This document has been placed in the public domain.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:

View File

@ -1,7 +1,5 @@
PEP: 453
Title: Explicit bootstrapping of pip in Python installations
Version: $Revision$
Last-Modified: $Date$
Author: Donald Stufft <donald@stufft.io>,
Nick Coghlan <ncoghlan@gmail.com>
BDFL-Delegate: Martin von Löwis
@ -32,7 +30,7 @@ PEP Acceptance
This PEP was accepted for inclusion in Python 3.4 by Martin von Löwis on
Tuesday 22nd October, 2013.
`Issue 19347 <http://bugs.python.org/issue19347>`__ has been created to
`Issue 19347 <https://github.com/python/cpython/issues/63546>`__ has been created to
track the implementation of this PEP.
@ -1021,49 +1019,38 @@ site-packages directory rather than the system site-packages).
References
==========
.. [1] Discussion thread 1 (distutils-sig)
(https://mail.python.org/pipermail/distutils-sig/2013-August/022529.html)
* `Discussion thread 1 (distutils-sig)
<https://mail.python.org/pipermail/distutils-sig/2013-August/022529.html>`_
.. [2] Discussion thread 2 (distutils-sig)
(https://mail.python.org/pipermail/distutils-sig/2013-September/022702.html)
* `Discussion thread 2 (distutils-sig)
<https://mail.python.org/pipermail/distutils-sig/2013-September/022702.html>`_
.. [3] Discussion thread 3 (python-dev)
(https://mail.python.org/pipermail/python-dev/2013-September/128723.html)
* `Discussion thread 3 (python-dev)
<https://mail.python.org/pipermail/python-dev/2013-September/128723.html>`_
.. [4] Discussion thread 4 (python-dev)
(https://mail.python.org/pipermail/python-dev/2013-September/128780.html)
* `Discussion thread 4 (python-dev)
<https://mail.python.org/pipermail/python-dev/2013-September/128780.html>`_
.. [5] Discussion thread 5 (python-dev)
(https://mail.python.org/pipermail/python-dev/2013-September/128894.html)
* `Discussion thread 5 (python-dev)
<https://mail.python.org/pipermail/python-dev/2013-September/128894.html>`_
.. [#cert-verification] pip/requests certificate management concerns
(https://mail.python.org/pipermail/python-dev/2013-October/129755.html)
.. [#cert-verification] `pip/requests certificate management concerns
<https://mail.python.org/pipermail/python-dev/2013-October/129755.html>`_
.. [#windows-incompatibility] Windows installer compatibility concerns
(https://mail.python.org/pipermail/distutils-sig/2013-October/022855.html)
.. [#windows-incompatibility] `Windows installer compatibility concerns
<https://mail.python.org/pipermail/distutils-sig/2013-October/022855.html>`_
.. [#ubuntu] `Ubuntu <http://www.ubuntu.com/>`
.. [#debian] `Debian <http://www.debian.org>`
.. [#fedora] `Fedora <https://fedoraproject.org/>`
.. [#homebrew] `Homebrew <http://brew.sh/>`
.. [#macports] `MacPorts <http://macports.org>`
.. [#fink] `Fink <http://finkproject.org>`
.. [#ContinuumIO] `Anaconda <https://store.continuum.io/cshop/anaconda/>`
.. [#ActiveState] `ActivePython <http://www.activestate.com/activepython>`
.. [#Enthought] `Enthought Canopy <https://www.enthought.com/products/canopy/>`
.. [#ubuntu] `Ubuntu <http://www.ubuntu.com/>`__
.. [#debian] `Debian <http://www.debian.org>`__
.. [#fedora] `Fedora <https://fedoraproject.org/>`__
.. [#homebrew] `Homebrew <https://brew.sh/>`__
.. [#macports] `MacPorts <https://macports.org>`__
.. [#fink] `Fink <https://finkproject.org>`__
.. [#ContinuumIO] `Anaconda <https://www.anaconda.com/products/distribution>`__
.. [#ActiveState] `ActivePython <http://www.activestate.com/activepython>`__
.. [#Enthought] `Enthought Canopy <https://www.enthought.com/products/canopy/>`__
Copyright
=========
This document has been placed in the public domain.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:

View File

@ -1,7 +1,5 @@
PEP: 462
Title: Core development workflow automation for CPython
Version: $Revision$
Last-Modified: $Date$
Author: Nick Coghlan <ncoghlan@gmail.com>
Status: Withdrawn
Type: Process
@ -403,7 +401,7 @@ Mercurial vs Gerrit/git
Gerrit uses git as the actual storage mechanism for patches, and
automatically handles merging of approved patches. By contrast, Kallithea
use the RhodeCode created `vcs <https://pythonhosted.org/vcs/>` library as
use the RhodeCode created `vcs <https://pythonhosted.org/vcs/>`_ library as
an abstraction layer over specific DVCS implementations (with Mercurial and
git backends currently available).
@ -511,7 +509,7 @@ Our current approach to handling NEWS file updates regularly results in
spurious conflicts when merging bug fixes forward from an active maintenance
branch to a later branch.
`Issue #18967* <http://bugs.python.org/issue18967>`__ discusses some
`Issue #18967* <https://github.com/python/cpython/issues/63167>`__ discusses some
possible improvements in that area, which would be beneficial regardless
of whether or not we adopt Zuul as a workflow automation tool.
@ -696,12 +694,3 @@ Copyright
=========
This document has been placed in the public domain.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:

View File

@ -1,7 +1,5 @@
PEP: 481
Title: Migrate CPython to Git, Github, and Phabricator
Version: $Revision$
Last-Modified: $Date$
Author: Donald Stufft <donald@stufft.io>
Status: Withdrawn
Type: Process
@ -345,22 +343,11 @@ workflow less reusable with other projects.
References
==========
.. [#openhub-stats] `Open Hub Statistics <https://www.openhub.net/repositories/compare>`
.. [#hg-git] `Hg-Git mercurial plugin <https://hg-git.github.io/>`
.. [#openhub-stats] `Open Hub Statistics <https://www.openhub.net/repositories/compare>`_
.. [#hg-git] `Hg-Git mercurial plugin <https://hg-git.github.io/>`_
Copyright
=========
This document has been placed in the public domain.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:

View File

@ -1,7 +1,5 @@
PEP: 507
Title: Migrate CPython to Git and GitLab
Version: $Revision$
Last-Modified: $Date$
Author: Barry Warsaw <barry@python.org>
Status: Rejected
Type: Process
@ -310,23 +308,12 @@ Open issues
References
==========
.. [#openhub-stats] `Open Hub Statistics <https://www.openhub.net/repositories/compare>`
.. [#hg-git] `Hg-Git mercurial plugin <https://hg-git.github.io/>`
.. [#GitLab] `https://about.gitlab.com/`
.. [#openhub-stats] `Open Hub Statistics <https://www.openhub.net/repositories/compare>`_
.. [#hg-git] `Hg-Git mercurial plugin <https://hg-git.github.io/>`_
.. [#GitLab] `<https://about.gitlab.com>`_
Copyright
=========
This document has been placed in the public domain.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:

View File

@ -1,7 +1,5 @@
PEP: 534
Title: Improved Errors for Missing Standard Library Modules
Version: $Revision$
Last-Modified: $Date$
Author: Tomáš Orsava <tomas.n@orsava.cz>,
Petr Viktorin <encukou@gmail.com>,
Nick Coghlan <ncoghlan@gmail.com>
@ -116,7 +114,7 @@ with two additional functions:
* ``sysconfig.get_optional_modules()``, which will list optional public top level
standard library module names
The results of ``sysconfig.get_optional_modules()``and the existing
The results of ``sysconfig.get_optional_modules()`` and the existing
``sys.builtin_module_names`` will both be subsets of the full list provided by
the new ``sysconfig.get_stdlib_modules()`` function.
@ -374,14 +372,3 @@ Copyright
=========
This document has been placed in the public domain.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:

View File

@ -359,7 +359,7 @@ For code that does not use ``contextvars``, the additions are O(1) and essential
More on implementation
''''''''''''''''''''''
The rest of the functionality, including ``contextvars.leaking_yields``, contextvars.capture()``, ``contextvars.get_local_state()`` and ``contextvars.clean_context()`` are in fact quite straightforward to implement, but their implementation will be discussed further in later versions of this proposal. Caching of assigned values is somewhat more complicated, and will be discussed later, but it seems that most cases should achieve O(1) complexity.
The rest of the functionality, including ``contextvars.leaking_yields``, ``contextvars.capture()``, ``contextvars.get_local_state()`` and ``contextvars.clean_context()`` are in fact quite straightforward to implement, but their implementation will be discussed further in later versions of this proposal. Caching of assigned values is somewhat more complicated, and will be discussed later, but it seems that most cases should achieve O(1) complexity.
Backwards compatibility
=======================
@ -403,13 +403,3 @@ Copyright
=========
This document has been placed in the public domain.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:

View File

@ -65,7 +65,7 @@ In the specification of multiple requirements with the same distribution name
(where environment markers choose the appropriate dependency), the chosen
solution is similar to `Poetry`_'s, where an array of requirements is allowed.
The direct-reference keys closely align with and utilise pep:`610` and
The direct-reference keys closely align with and utilise :pep:`610` and
:pep:`440` as to reduce differences in the packaging ecosystem and rely on
previous work in specification.
@ -741,12 +741,3 @@ Copyright
This document is placed in the public domain or under the
CC0-1.0-Universal license, whichever is more permissive.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End:

View File

@ -781,7 +781,7 @@ Converting legacy metadata
Tools MUST NOT use the contents of the ``license.text`` ``[project]`` key
(or equivalent tool-specific format),
license classifiers or the value of the core metadata ``License`` field
to fill the top-level string value of the ``license`` key ``
to fill the top-level string value of the ``license`` key
or the core metadata ``License-Expression`` field
without informing the user and requiring unambiguous, affirmative user action
to select and confirm the desired license expression value before proceeding.

View File

@ -107,7 +107,7 @@ Specification
Additions to the object model
-----------------------------
The ``__match_container__ ``and ``__match_class__`` attributes will be added to ``object``.
The ``__match_container__`` and ``__match_class__`` attributes will be added to ``object``.
``__match_container__`` should be overridden by classes that want to match mapping or sequence patterns.
``__match_class__`` should be overridden by classes that want to change the default behavior when matching class patterns.
@ -871,14 +871,3 @@ Copyright
This document is placed in the public domain or under the
CC0-1.0-Universal license, whichever is more permissive.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End: