Skip to content

Commit ce3c96e

Browse files
authored
Fix type checker and bump tools (#3107)
1 parent cd7616f commit ce3c96e

File tree

5 files changed

+13
-18
lines changed

5 files changed

+13
-18
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ repos:
1414
- id: tox-ini-fmt
1515
args: ["-p", "fix"]
1616
- repo: https://github.com/tox-dev/pyproject-fmt
17-
rev: "0.13.1"
17+
rev: "1.1.0"
1818
hooks:
1919
- id: pyproject-fmt
20-
additional_dependencies: ["tox>=4.8"]
20+
additional_dependencies: ["tox>=4.10"]
2121
- repo: https://github.com/pre-commit/mirrors-prettier
2222
rev: "v3.0.2"
2323
hooks:
@@ -29,7 +29,7 @@ repos:
2929
- id: blacken-docs
3030
additional_dependencies: [black==23.7]
3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: "v0.0.285"
32+
rev: "v0.0.286"
3333
hooks:
3434
- id: ruff
3535
args: [--fix, --exit-non-zero-on-fix]

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ dependencies = [
5454
'importlib-metadata>=6.8; python_version < "3.8"',
5555
"packaging>=23.1",
5656
"platformdirs>=3.10",
57-
"pluggy>=1.2",
58-
"pyproject-api>=1.5.3",
57+
"pluggy>=1.3",
58+
"pyproject-api>=1.5.4",
5959
'tomli>=2.0.1; python_version < "3.11"',
6060
'typing-extensions>=4.7.1; python_version < "3.8"',
6161
"virtualenv>=20.24.3",
6262
]
6363
optional-dependencies.docs = [
64-
"furo>=2023.7.26",
65-
"sphinx>=7.1.2",
64+
"furo>=2023.8.19",
65+
"sphinx>=7.2.4",
6666
"sphinx-argparse-cli>=1.11.1",
6767
"sphinx-autodoc-typehints!=1.23.4,>=1.24",
6868
"sphinx-copybutton>=0.5.2",
@@ -74,7 +74,7 @@ optional-dependencies.testing = [
7474
"build[virtualenv]>=0.10",
7575
"covdefaults>=2.3",
7676
"detect-test-pollution>=1.1.1",
77-
"devpi-process>=0.3.1",
77+
"devpi-process>=1",
7878
"diff-cover>=7.7",
7979
"distlib>=0.3.7",
8080
"flaky>=3.7",
@@ -87,7 +87,7 @@ optional-dependencies.testing = [
8787
"pytest-xdist>=3.3.1",
8888
"re-assert>=1.1",
8989
'time-machine>=2.12; implementation_name != "pypy"',
90-
"wheel>=0.41.1",
90+
"wheel>=0.41.2",
9191
]
9292
urls.Documentation = "https://tox.wiki"
9393
urls.Homepage = "http://tox.readthedocs.org"

src/tox/plugin/spec.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, Callable, TypeVar, cast
3+
from typing import TYPE_CHECKING, Any
44

55
import pluggy
66

@@ -14,12 +14,7 @@
1414
from tox.tox_env.api import ToxEnv
1515
from tox.tox_env.register import ToxEnvRegister
1616

17-
_F = TypeVar("_F", bound=Callable[..., Any])
18-
_spec_marker = pluggy.HookspecMarker(NAME)
19-
20-
21-
def _spec(func: _F) -> _F:
22-
return cast(_F, _spec_marker(func))
17+
_spec = pluggy.HookspecMarker(NAME)
2318

2419

2520
@_spec

src/tox/pytest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def pytest_configure(config: pytest.Config) -> None:
443443
config.addinivalue_line("markers", "plugin_test")
444444

445445

446-
@pytest.hookimpl(trylast=True) # type: ignore[misc] # not typed decorator
446+
@pytest.hookimpl(trylast=True)
447447
def pytest_collection_modifyitems(config: pytest.Config, items: list[pytest.Function]) -> None:
448448
# do not require flags if called directly
449449
if len(items) == 1: # pragma: no cover # hard to test

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ commands =
5252
[testenv:type]
5353
description = run type check on code base
5454
deps =
55-
mypy==1.5
55+
mypy==1.5.1
5656
types-cachetools>=5.3.0.6
5757
types-chardet>=5.0.4.6
5858
commands =

0 commit comments

Comments
 (0)