8000 Infra + many PEPs: Add Sphinx Lint and fix errors by hugovk · Pull Request #2816 · python/peps · GitHub
[go: up one dir, main page]

Skip to content

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

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 13 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 10 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
23 changes: 5 additions & 18 deletions pep-0372.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}'
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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:
61 changes: 24 additions & 37 deletions pep-0453.txt
6855
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.


Expand Down Expand Up @@ -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:
15 changes: 2 additions & 13 deletions pep-0462.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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).

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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:
17 changes: 2 additions & 15 deletions pep-0481.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
19 changes: 3 additions & 16 deletions pep-0507.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
15 changes: 1 addition & 14 deletions pep-0534.txt
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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:
12 changes: 1 addition & 11 deletions pep-0555.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=======================
Expand Down Expand Up @@ -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:
11 changes: 1 addition & 10 deletions pep-0633.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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:
2 changes: 1 addition & 1 deletion pep-0639.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
13 changes: 1 addition & 12 deletions pep-0653.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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:
Loading
0