diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1a5f58c8..4c70a3f63 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,4 +2,32 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-merge-conflict + - id: check-symlinks + - id: check-yaml + - id: end-of-file-fixer + - id: mixed-line-ending - id: trailing-whitespace + +- repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + args: ["-L", "ned"] + +- repo: local + hooks: + - id: disallow-caps + name: Disallow improper capitalization + language: pygrep + entry: PyBind|Numpy|Cmake|CCache|Github|PyTest + exclude: .pre-commit-config.yaml + +- repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: rst-backticks + - id: rst-directive-colons + - id: rst-inline-touching-normal diff --git a/source/contribute.rst b/source/contribute.rst index 0dbdc1adc..afac9e4f7 100644 --- a/source/contribute.rst +++ b/source/contribute.rst @@ -75,7 +75,7 @@ We use `Weblate`_ to manage translations of this project. Please visit the `packaging.python.org`_ project on Weblate to contribute. If you are experiencing issues while you are working on translations, -please open an issue on `Github`_. +please open an issue on `GitHub`_. .. tip:: @@ -83,7 +83,7 @@ please open an issue on `Github`_. .. _Weblate: https://weblate.org/ .. _packaging.python.org: https://hosted.weblate.org/projects/pypa/packaging-python-org/ -.. _Github: https://github.com/pypa/packaging.python.org/issues +.. _GitHub: https://github.com/pypa/packaging.python.org/issues .. _reStructuredText syntax: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html Adding a language diff --git a/source/discussions/deploying-python-applications.rst b/source/discussions/deploying-python-applications.rst index 62e29448f..d9246d563 100644 --- a/source/discussions/deploying-python-applications.rst +++ b/source/discussions/deploying-python-applications.rst @@ -73,7 +73,7 @@ directory, independent of any other Python installation on the computer. A big advantage of Pynsist is that the Windows packages can be built on Linux. There are several examples for different kinds of programs (console, GUI) in -the `documentation `. The tool is released +the :any:`documentation `. The tool is released under the MIT-licence. Application bundles diff --git a/source/guides/distributing-packages-using-setuptools.rst b/source/guides/distributing-packages-using-setuptools.rst index eb99b3ff0..db982071d 100644 --- a/source/guides/distributing-packages-using-setuptools.rst +++ b/source/guides/distributing-packages-using-setuptools.rst @@ -241,7 +241,7 @@ can be specified with the ``long_description_content_type`` argument, which can be one of ``text/plain``, ``text/x-rst``, or ``text/markdown``, corresponding to no formatting, `reStructuredText (reST) `_, -and the Github-flavored Markdown dialect of `Markdown +and the GitHub-flavored Markdown dialect of `Markdown `_ respectively. ``url`` diff --git a/source/guides/dropping-older-python-versions.rst b/source/guides/dropping-older-python-versions.rst index aec65b48d..2ac193b4c 100644 --- a/source/guides/dropping-older-python-versions.rst +++ b/source/guides/dropping-older-python-versions.rst @@ -41,7 +41,7 @@ explicitly set ``universal`` to ``0``: # setup.cfg [bdist_wheel] - universal = 0 # Make the generated wheels have `py3` tag + universal = 0 # Make the generated wheels have "py3" tag .. tip:: @@ -71,7 +71,7 @@ Steps: py -m pip install --upgrade setuptools twine -`setuptools` version should be above 24.0.0. +``setuptools`` version should be above 24.0.0. 2. Specify the version ranges for supported Python distributions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/guides/supporting-multiple-python-versions.rst b/source/guides/supporting-multiple-python-versions.rst index 23c1f51c0..0471a1f2f 100644 --- a/source/guides/supporting-multiple-python-versions.rst +++ b/source/guides/supporting-multiple-python-versions.rst @@ -52,7 +52,7 @@ Automated testing and continuous integration Several hosted services for automated testing are available. These services will typically monitor your source code repository (e.g. at -`Github `_ or `Bitbucket `_) +`GitHub `_ or `Bitbucket `_) and run your project's test suite every time a new commit is made. These services also offer facilities to run your project's test suite on diff --git a/source/guides/supporting-windows-using-appveyor.rst b/source/guides/supporting-windows-using-appveyor.rst index 79242510c..1f43c443b 100644 --- a/source/guides/supporting-windows-using-appveyor.rst +++ b/source/guides/supporting-windows-using-appveyor.rst @@ -25,7 +25,7 @@ non-trivial, and may require buying software licenses. The Appveyor service is a continuous integration service, much like the better-known `Travis`_ service that is commonly used for testing by projects -hosted on `Github`_. However, unlike Travis, the build workers on Appveyor are +hosted on `GitHub`_. However, unlike Travis, the build workers on Appveyor are Windows hosts and have the necessary compilers installed to build Python extensions. @@ -44,7 +44,7 @@ have an account on the service. Instructions on setting up an account are given in `the Appveyor documentation `__. The free tier of account is perfectly adequate for open source projects. -Appveyor provides integration with `Github`_ and `Bitbucket`_, so as long as +Appveyor provides integration with `GitHub`_ and `Bitbucket`_, so as long as your project is hosted on one of those two services, setting up Appveyor integration is straightforward. @@ -241,5 +241,5 @@ For reference, the SDK setup support script is listed here: .. _Appveyor: https://www.appveyor.com/ .. _Travis: https://travis-ci.org/ -.. _Github: https://github.com +.. _GitHub: https://github.com .. _Bitbucket: https://bitbucket.org/ diff --git a/source/key_projects.rst b/source/key_projects.rst index 8d1d42b40..03c736e6b 100644 --- a/source/key_projects.rst +++ b/source/key_projects.rst @@ -34,7 +34,7 @@ Content Delivery Network (CDN). build ===== -`Docs ` | +:any:`Docs ` | `Issues `__ | `GitHub `__ | `PyPI `__ @@ -180,7 +180,7 @@ Pipenv Pipenv is a project that aims to bring the best of all packaging worlds to the Python world. It harnesses :ref:`Pipfile`, :ref:`pip`, and :ref:`virtualenv` into one single toolchain. It can autoimport ``requirements.txt`` and also -check for CVEs in `Pipfile` using `safety `_. +check for CVEs in `Pipfile`_ using `safety `_. Pipenv aims to help users manage environments, dependencies, and imported packages on the command line. It also works well on Windows diff --git a/source/specifications/core-metadata.rst b/source/specifications/core-metadata.rst index 0c4f4b490..cefd68950 100644 --- a/source/specifications/core-metadata.rst +++ b/source/specifications/core-metadata.rst @@ -285,7 +285,7 @@ Other parameters might be specific to the chosen subtype. For example, for the specifying the variant of Markdown in use (defaults to ``GFM`` if not specified). Currently, two variants are recognized: -- ``GFM`` for :rfc:`Github-flavored Markdown <7764#section-3.2>` +- ``GFM`` for :rfc:`GitHub-flavored Markdown <7764#section-3.2>` - ``CommonMark`` for :rfc:`CommonMark <7764#section-3.5>` Example:: diff --git a/source/specifications/declaring-build-dependencies.rst b/source/specifications/declaring-build-dependencies.rst index 74f9c3ca2..9e5b72308 100644 --- a/source/specifications/declaring-build-dependencies.rst +++ b/source/specifications/declaring-build-dependencies.rst @@ -5,6 +5,6 @@ Declaring build system dependencies =================================== -`pyproject.toml` is a build system independent file format defined in :pep:`518` +``pyproject.toml`` is a build system independent file format defined in :pep:`518` that projects may provide in order to declare any Python level dependencies that must be installed in order to run the project's build system successfully. diff --git a/source/specifications/dependency-specifiers.rst b/source/specifications/dependency-specifiers.rst index 43b362109..009b8a592 100644 --- a/source/specifications/dependency-specifiers.rst +++ b/source/specifications/dependency-specifiers.rst @@ -488,4 +488,3 @@ References .. [#future_versions] Future Python versions might be problematic with the definition of Environment Marker Variable ``python_version`` (https://github.com/python/peps/issues/560) - diff --git a/source/specifications/externally-managed-environments.rst b/source/specifications/externally-managed-environments.rst index e4ee921d2..979b72aec 100644 --- a/source/specifications/externally-managed-environments.rst +++ b/source/specifications/externally-managed-environments.rst @@ -23,4 +23,4 @@ environment, and should instead guide the end user towards using History ======= -- `June 2022 `_: ``EXTERNALLY-MANAGED`` marker file was originally specified in :pep:`668#marking-an-interpreter-as-using-an-external-package-manager`. \ No newline at end of file +- `June 2022 `_: ``EXTERNALLY-MANAGED`` marker file was originally specified in :pep:`668#marking-an-interpreter-as-using-an-external-package-manager`. diff --git a/source/specifications/name-normalization.rst b/source/specifications/name-normalization.rst index 7a1a0e083..4756d1631 100644 --- a/source/specifications/name-normalization.rst +++ b/source/specifications/name-normalization.rst @@ -42,4 +42,4 @@ History ======= - `September 2015 `_: normalized name was originally specified in :pep:`503#normalized-names`. -- `November 2015 `_: valid non-normalized name was originally specified in :pep:`508#names`. \ No newline at end of file +- `November 2015 `_: valid non-normalized name was originally specified in :pep:`508#names`. diff --git a/source/tutorials/creating-documentation.rst b/source/tutorials/creating-documentation.rst index ec960ada0..483fb0d72 100644 --- a/source/tutorials/creating-documentation.rst +++ b/source/tutorials/creating-documentation.rst @@ -64,7 +64,3 @@ Other Sources For a more detailed guide on how to use Sphinx and reStructuredText, please see this `documentation tutorial`_ on Hitchhiker's Guide to Python. .. _documentation tutorial: https://docs.python-guide.org/writing/documentation/ - - - - diff --git a/source/tutorials/packaging-projects.rst b/source/tutorials/packaging-projects.rst index 89e1d073d..e92870030 100644 --- a/source/tutorials/packaging-projects.rst +++ b/source/tutorials/packaging-projects.rst @@ -245,7 +245,7 @@ if you'd like. # Example Package This is a simple example package. You can use - [Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/) + [GitHub-flavored Markdown](https://guides.github.com/features/mastering-markdown/) to write your content. @@ -517,4 +517,3 @@ some things you can do: :ref:`pdm`, and :ref:`poetry`. * Read :pep:`517` and :pep:`518` for background and details on build tool configuration. * Read about :doc:`/guides/packaging-binary-extensions`. -