From 44f56a56eb2417072fb8a346a08987a48ae22962 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 3 Sep 2023 15:26:54 +0200 Subject: [PATCH 1/2] Fix typos discovered by codespell --- .pre-commit-config.yaml | 15 +++++++++++---- docs/changelog.rst | 6 +++--- docs/config.rst | 2 +- src/tox/tox_env/python/api.py | 2 +- src/tox/tox_env/python/pip/pip_install.py | 2 +- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc27546b7..e78e4b058 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,18 +8,25 @@ repos: rev: 23.7.0 hooks: - id: black + - repo: https://github.com/codespell-project/codespell + rev: v2.2.5 + hooks: + - id: codespell + args: ["--ignore-words-list", "crate,releas", "--skip", "*.svg"] + additional_dependencies: + - tomli - repo: https://github.com/tox-dev/tox-ini-fmt - rev: "1.3.1" + rev: 1.3.1 hooks: - id: tox-ini-fmt args: ["-p", "fix"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: "1.1.0" + rev: 1.1.0 hooks: - id: pyproject-fmt additional_dependencies: ["tox>=4.10"] - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.3" + rev: v3.0.3 hooks: - id: prettier args: ["--print-width=120", "--prose-wrap=always"] @@ -29,7 +36,7 @@ repos: - id: blacken-docs additional_dependencies: [black==23.7] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.287" + rev: v0.0.287 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/docs/changelog.rst b/docs/changelog.rst index 519f970ea..38b0a4c41 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -114,7 +114,7 @@ v4.6.0 (2023-06-05) Features - 4.6.0 ~~~~~~~~~~~~~~~~ -- Addded ``--list-dependencies`` and ``--no-list-dependencies`` CLI parameters. +- Added ``--list-dependencies`` and ``--no-list-dependencies`` CLI parameters. If unspecified, defaults to listing when in CI, but not otherwise. (:issue:`3024`) Misc - 4.6.0 @@ -273,7 +273,7 @@ Bugfixes - 4.4.0 esoteric quoting. To make this transition easier, on Windows, the backslash path separator will not treated as an escape character unless - it preceeds a quote, whitespace, or another backslash chracter. This allows paths to mostly be written in single or + it precedes a quote, whitespace, or another backslash character. This allows paths to mostly be written in single or double backslash style. Note that **double-backslash will no longer be escaped to a single backslash in substitutions**, instead the double @@ -338,7 +338,7 @@ v4.3.2 (2023-01-16) Bugfixes - 4.3.2 ~~~~~~~~~~~~~~~~ -- Fix regression introduced in 4.3.0 which occured when a substitution expression +- Fix regression introduced in 4.3.0 which occurred when a substitution expression for an environment variable that had previously been substituted appears in the ini file after a substitution expression for a different environment variable. This situation erroneously resulted in an exception about "circular chain diff --git a/docs/config.rst b/docs/config.rst index cd38dd4c4..1e9d3805a 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -935,7 +935,7 @@ It's possible to inject a config value only when tox is running in interactive s {tty:ON_VALUE:OFF_VALUE} The first value is the value to inject when the interactive terminal is -available, the second value is the value to use when it's not (optiona). A good +available, the second value is the value to use when it's not (optional). A good use case for this is e.g. passing in the ``--pdb`` flag for pytest. .. _`command positional substitution`: diff --git a/src/tox/tox_env/python/api.py b/src/tox/tox_env/python/api.py index 955b71364..3af892c1a 100644 --- a/src/tox/tox_env/python/api.py +++ b/src/tox/tox_env/python/api.py @@ -50,7 +50,7 @@ def version_dot(self) -> str: PY_FACTORS_RE = re.compile( r""" ^(?!py$) # don't match 'py' as it doesn't provide any info - (?Ppy|pypy|cpython|jython|rustpython|ironpython) # the interpeter; most users will simply use 'py' + (?Ppy|pypy|cpython|jython|rustpython|ironpython) # the interpreter; most users will simply use 'py' (?P[2-9]\.?[0-9]?[0-9]?)?$ # the version; one of: MAJORMINOR, MAJOR.MINOR """, re.VERBOSE, diff --git a/src/tox/tox_env/python/pip/pip_install.py b/src/tox/tox_env/python/pip/pip_install.py index 822220e4b..4b75c2b3c 100644 --- a/src/tox/tox_env/python/pip/pip_install.py +++ b/src/tox/tox_env/python/pip/pip_install.py @@ -58,7 +58,7 @@ def _register_config(self) -> None: keys=["list_dependencies_command"], of_type=Command, default=Command(["python", "-m", "pip", "freeze", "--all"]), - desc="command used to list isntalled packages", + desc="command used to list installed packages", ) def default_install_command(self, conf: Config, env_name: str | None) -> Command: # noqa: ARG002 From ac2f4d87728d1ea30d703cd9a9f9e6799776980a Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 3 Sep 2023 17:01:30 +0200 Subject: [PATCH 2/2] touch docs/changelog/3113.misc.rst --- docs/changelog/3113.misc.rst | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/changelog/3113.misc.rst diff --git a/docs/changelog/3113.misc.rst b/docs/changelog/3113.misc.rst new file mode 100644 index 000000000..e69de29bb