Skip to content

Commit a1a3c7f

Browse files
committed
chore: add some more pre-commit checks
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 0b20b77 commit a1a3c7f

15 files changed

+45
-23
lines changed

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,32 @@ repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
33
rev: v4.4.0
44
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: check-symlinks
9+
- id: check-yaml
10+
- id: end-of-file-fixer
11+
- id: mixed-line-ending
512
- id: trailing-whitespace
13+
14+
- repo: https://github.com/codespell-project/codespell
15+
rev: v2.2.6
16+
hooks:
17+
- id: codespell
18+
args: ["-L", "ned"]
19+
20+
- repo: local
21+
hooks:
22+
- id: disallow-caps
23+
name: Disallow improper capitalization
24+
language: pygrep
25+
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
26+
exclude: .pre-commit-config.yaml
27+
28+
- repo: https://github.com/pre-commit/pygrep-hooks
29+
rev: v1.10.0
30+
hooks:
31+
- id: rst-backticks
32+
- id: rst-directive-colons
33+
- id: rst-inline-touching-normal

source/contribute.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ We use `Weblate`_ to manage translations of this project.
7575
Please visit the `packaging.python.org`_ project on Weblate to contribute.
7676

7777
If you are experiencing issues while you are working on translations,
78-
please open an issue on `Github`_.
78+
please open an issue on `GitHub`_.
7979

8080
.. tip::
8181

8282
Any translations of this project should follow `reStructuredText syntax`_.
8383

8484
.. _Weblate: https://weblate.org/
8585
.. _packaging.python.org: https://hosted.weblate.org/projects/pypa/packaging-python-org/
86-
.. _Github: https://github.com/pypa/packaging.python.org/issues
86+
.. _GitHub: https://github.com/pypa/packaging.python.org/issues
8787
.. _reStructuredText syntax: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
8888

8989
Adding a language

source/discussions/deploying-python-applications.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ directory, independent of any other Python installation on the computer.
7373

7474
A big advantage of Pynsist is that the Windows packages can be built on Linux.
7575
There are several examples for different kinds of programs (console, GUI) in
76-
the `documentation <pynsist:index>`. The tool is released
76+
the :any:`documentation <pynsist:index>`. The tool is released
7777
under the MIT-licence.
7878

7979
Application bundles

source/guides/distributing-packages-using-setuptools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ can be specified with the ``long_description_content_type`` argument, which can
241241
be one of ``text/plain``, ``text/x-rst``, or ``text/markdown``, corresponding
242242
to no formatting, `reStructuredText (reST)
243243
<https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#reference-names>`_,
244-
and the Github-flavored Markdown dialect of `Markdown
244+
and the GitHub-flavored Markdown dialect of `Markdown
245245
<https://daringfireball.net/projects/markdown/>`_ respectively.
246246

247247
``url``

source/guides/dropping-older-python-versions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ explicitly set ``universal`` to ``0``:
4141
# setup.cfg
4242
4343
[bdist_wheel]
44-
universal = 0 # Make the generated wheels have `py3` tag
44+
universal = 0 # Make the generated wheels have "py3" tag
4545
4646
.. tip::
4747

@@ -71,7 +71,7 @@ Steps:
7171
7272
py -m pip install --upgrade setuptools twine
7373
74-
`setuptools` version should be above 24.0.0.
74+
``setuptools`` version should be above 24.0.0.
7575

7676
2. Specify the version ranges for supported Python distributions
7777
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

source/guides/supporting-multiple-python-versions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Automated testing and continuous integration
5252

5353
Several hosted services for automated testing are available. These services
5454
will typically monitor your source code repository (e.g. at
55-
`Github <https://github.com>`_ or `Bitbucket <https://bitbucket.org>`_)
55+
`GitHub <https://github.com>`_ or `Bitbucket <https://bitbucket.org>`_)
5656
and run your project's test suite every time a new commit is made.
5757

5858
These services also offer facilities to run your project's test suite on

source/guides/supporting-windows-using-appveyor.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ non-trivial, and may require buying software licenses.
2525

2626
The Appveyor service is a continuous integration service, much like the
2727
better-known `Travis`_ service that is commonly used for testing by projects
28-
hosted on `Github`_. However, unlike Travis, the build workers on Appveyor are
28+
hosted on `GitHub`_. However, unlike Travis, the build workers on Appveyor are
2929
Windows hosts and have the necessary compilers installed to build Python
3030
extensions.
3131

@@ -44,7 +44,7 @@ have an account on the service. Instructions on setting up an account are given
4444
in `the Appveyor documentation <https://www.appveyor.com/docs/>`__. The free tier
4545
of account is perfectly adequate for open source projects.
4646

47-
Appveyor provides integration with `Github`_ and `Bitbucket`_, so as long as
47+
Appveyor provides integration with `GitHub`_ and `Bitbucket`_, so as long as
4848
your project is hosted on one of those two services, setting up Appveyor
4949
integration is straightforward.
5050

@@ -241,5 +241,5 @@ For reference, the SDK setup support script is listed here:
241241

242242
.. _Appveyor: https://www.appveyor.com/
243243
.. _Travis: https://travis-ci.org/
244-
.. _Github: https://github.com
244+
.. _GitHub: https://github.com
245245
.. _Bitbucket: https://bitbucket.org/

source/key_projects.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Content Delivery Network (CDN).
3434
build
3535
=====
3636

37-
`Docs <build:index>` |
37+
:any:`Docs <build:index>` |
3838
`Issues <https://github.com/pypa/build/issues>`__ |
3939
`GitHub <https://github.com/pypa/build>`__ |
4040
`PyPI <https://pypi.org/project/build>`__
@@ -180,7 +180,7 @@ Pipenv
180180
Pipenv is a project that aims to bring the best of all packaging worlds to the
181181
Python world. It harnesses :ref:`Pipfile`, :ref:`pip`, and :ref:`virtualenv`
182182
into one single toolchain. It can autoimport ``requirements.txt`` and also
183-
check for CVEs in `Pipfile` using `safety <https://pyup.io/safety>`_.
183+
check for CVEs in `Pipfile`_ using `safety <https://pyup.io/safety>`_.
184184

185185
Pipenv aims to help users manage environments, dependencies, and
186186
imported packages on the command line. It also works well on Windows

source/specifications/core-metadata.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ Other parameters might be specific to the chosen subtype. For example, for the
285285
specifying the variant of Markdown in use (defaults to ``GFM`` if not
286286
specified). Currently, two variants are recognized:
287287

288-
- ``GFM`` for :rfc:`Github-flavored Markdown <7764#section-3.2>`
288+
- ``GFM`` for :rfc:`GitHub-flavored Markdown <7764#section-3.2>`
289289
- ``CommonMark`` for :rfc:`CommonMark <7764#section-3.5>`
290290

291291
Example::

source/specifications/declaring-build-dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
Declaring build system dependencies
66
===================================
77

8-
`pyproject.toml` is a build system independent file format defined in :pep:`518`
8+
``pyproject.toml`` is a build system independent file format defined in :pep:`518`
99
that projects may provide in order to declare any Python level dependencies that
1010
must be installed in order to run the project's build system successfully.

0 commit comments

Comments
 (0)