Skip to content

[pre-commit.ci] pre-commit autoupdate #3286

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 3 commits into from
Jun 21, 2024
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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.3
rev: 0.28.5
hooks:
- id: check-github-workflows
args: [ "--verbose" ]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies: ["tomli>=2.0.1"]
Expand All @@ -20,11 +20,11 @@ repos:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.1.1"
rev: "2.1.3"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.4"
rev: "v0.4.10"
hooks:
- id: ruff-format
- id: ruff
Expand All @@ -33,7 +33,7 @@ repos:
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==24.4]
additional_dependencies: [black==24.4.2]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
Expand Down
76 changes: 38 additions & 38 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.4",
"hatchling>=1.21",
"hatchling>=1.24.2",
]

[project]
Expand Down Expand Up @@ -49,47 +49,47 @@ dynamic = [
"version",
]
dependencies = [
"cachetools>=5.3.2",
"cachetools>=5.3.3",
"chardet>=5.2",
"colorama>=0.4.6",
"filelock>=3.13.1",
"importlib-metadata>=7.0.1; python_version<'3.8'",
"packaging>=23.2",
"platformdirs>=4.1",
"pluggy>=1.3",
"filelock>=3.15.3",
"importlib-metadata>=7.2; python_version<'3.8'",
"packaging>=24.1",
"platformdirs>=4.2.2",
"pluggy>=1.5",
"pyproject-api>=1.6.1",
"tomli>=2.0.1; python_version<'3.11'",
"typing-extensions>=4.9; python_version<'3.8'",
"virtualenv>=20.25",
"typing-extensions>=4.12.2; python_version<'3.8'",
"virtualenv>=20.26.2",
]
optional-dependencies.docs = [
"furo>=2023.9.10",
"sphinx>=7.2.6",
"sphinx-argparse-cli>=1.11.1",
"sphinx-autodoc-typehints!=1.23.4,>=1.25.2",
"furo>=2024.5.6",
"sphinx>=7.3.7",
"sphinx-argparse-cli>=1.16",
"sphinx-autodoc-typehints!=1.23.4,>=2.2.1",
"sphinx-copybutton>=0.5.2",
"sphinx-inline-tabs>=2023.4.21",
"sphinxcontrib-towncrier>=0.2.1a0",
"towncrier>=23.11",
]
optional-dependencies.testing = [
"build[virtualenv]>=1.0.3",
"build[virtualenv]>=1.2.1",
"covdefaults>=2.3",
"detect-test-pollution>=1.2",
"devpi-process>=1",
"diff-cover>=8.0.2",
"diff-cover>=9",
"distlib>=0.3.8",
"flaky>=3.7",
"flaky>=3.8.1",
"hatch-vcs>=0.4",
"hatchling>=1.21",
"psutil>=5.9.7",
"pytest>=7.4.4",
"pytest-cov>=4.1",
"pytest-mock>=3.12",
"pytest-xdist>=3.5",
"hatchling>=1.24.2",
"psutil>=6",
"pytest>=8.2.2",
"pytest-cov>=5",
"pytest-mock>=3.14",
"pytest-xdist>=3.6.1",
"re-assert>=1.1",
"time-machine>=2.13; implementation_name!='pypy'",
"wheel>=0.42",
"time-machine>=2.14.1; implementation_name!='pypy'",
"wheel>=0.43",
]
urls.Documentation = "https://tox.wiki"
urls.Homepage = "http://tox.readthedocs.org"
Expand Down Expand Up @@ -119,20 +119,6 @@ format.docstring-code-format = true
lint.select = [
"ALL",
]
lint.per-file-ignores."tests/**/*.py" = [
"D", # don't care about documentation in tests
"FBT", # don"t care about booleans as positional arguments in tests
"INP001", # no implicit namespace
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"S101", # asserts allowed in tests...
"S603", # `subprocess` call: check for execution of untrusted input
]
lint.isort = { known-first-party = [
"tox",
"tests",
], required-imports = [
"from __future__ import annotations",
] }
lint.ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod"
Expand All @@ -149,6 +135,20 @@ lint.ignore = [
"S104", # Possible binding to all interfaces
"S404", # Using subprocess is alright.
]
lint.per-file-ignores."tests/**/*.py" = [
"D", # don't care about documentation in tests
"FBT", # don"t care about booleans as positional arguments in tests
"INP001", # no implicit namespace
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"S101", # asserts allowed in tests...
"S603", # `subprocess` call: check for execution of untrusted input
]
lint.isort = { known-first-party = [
"tox",
"tests",
], required-imports = [
"from __future__ import annotations",
] }
lint.preview = true

[tool.codespell]
Expand Down
2 changes: 1 addition & 1 deletion src/tox/config/loader/ini/replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _replace_ref(env: str | None) -> Pattern[str]:
)


def replace_reference( # noqa: PLR0912, C901
def replace_reference( # noqa: C901
conf: Config,
loader: IniLoader,
value: str,
Expand Down
2 changes: 1 addition & 1 deletion src/tox/config/loader/str_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def to_command(value: str) -> Command:
# on Windows quoted arguments will remain quoted, strip it
arg = arg[1:-1] # noqa: PLW2901
args.append(arg)
pos = splitter.instream.tell()
pos = splitter.instream.tell() # type: ignore[attr-defined]
except ValueError:
args.append(value[pos:])
if len(args) == 0:
Expand Down
1 change: 0 additions & 1 deletion src/tox/execute/local_sub_process/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ def _pty(key: str) -> tuple[int, int] | None:


__all__ = (
"CREATION_FLAGS",
"SIG_INTERRUPT",
"LocalSubProcessExecuteInstance",
"LocalSubProcessExecutor",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

from __future__ import annotations # pragma: win32 cover

import _overlapped # type: ignore[import] # pragma: win32 cover # noqa: PLC2701
import logging # pragma: win32 cover
from asyncio.windows_utils import BUFSIZE # type: ignore[attr-defined] # pragma: win32 cover
from time import sleep # pragma: win32 cover
from typing import Callable # pragma: win32 cover

import _overlapped # type: ignore[import] # pragma: win32 cover # noqa: PLC2701

from .read_via_thread import ReadViaThread # pragma: win32 cover

# mypy: warn-unused-ignores=false
Expand Down
2 changes: 1 addition & 1 deletion src/tox/tox_env/python/pip/req/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


class ParsedRequirement:
def __init__(self, req: str, options: dict[str, Any], from_file: str, lineno: int) -> None: # noqa: PLR0912
def __init__(self, req: str, options: dict[str, Any], from_file: str, lineno: int) -> None:
req = req.encode("utf-8").decode("utf-8")
try:
self._requirement: Requirement | Path | str = Requirement(req)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def read_text(self, filename: str) -> str | None:
except KeyError:
return None

def locate_file(self, path: str | PathLike[str]) -> PathLike[str]:
def locate_file(self, path: str | PathLike[str]) -> Path:
return self._wheel / path # pragma: no cover # not used by us, but part of the ABC


Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ commands =
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
skip_install = true
deps =
pre-commit>=3.7
pre-commit>=3.7.1
pass_env =
{[testenv]passenv}
PROGRAMDATA
Expand All @@ -51,7 +51,7 @@ commands =
[testenv:type]
description = run type check on code base
deps =
mypy==1.9
mypy==1.10
types-cachetools>=5.3.0.7
types-chardet>=5.0.4.6
commands =
Expand All @@ -73,7 +73,7 @@ skip_install = true
deps =
build[virtualenv]>=1.2.1
check-wheel-contents>=0.6
twine>=5
twine>=5.1
commands =
python -m build -o {envtmpdir} -s -w .
twine check {envtmpdir}{/}*
Expand All @@ -84,7 +84,7 @@ description = do a release, required posarg of the version number
skip_install = true
deps =
gitpython>=3.1.43
packaging>=24
packaging>=24.1
towncrier>=23.11
commands =
python {toxinidir}/tasks/release.py --version {posargs}
Expand Down
Loading