Skip to content

Commit

Permalink
Bump deps and tools (#2954)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Mar 23, 2023
1 parent f41c2cd commit 0a3d578
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 33 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Expand Up @@ -52,14 +52,14 @@ repos:
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==23.1.20
- flake8-comprehensions==3.10.1
- flake8-pytest-style==1.6
- flake8-bugbear==23.3.12
- flake8-comprehensions==3.11.1
- flake8-pytest-style==1.7.2
- flake8-spellcheck==0.28
- flake8-unused-arguments==0.0.13
- flake8-noqa==1.3
- flake8-noqa==1.3.1
- pep8-naming==0.13.3
- flake8-pyproject==1.2.2
- flake8-pyproject==1.2.3
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
hooks:
Expand Down
26 changes: 13 additions & 13 deletions pyproject.toml
Expand Up @@ -2,7 +2,7 @@
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.3",
"hatchling>=1.12.2",
"hatchling>=1.13",
]

[project]
Expand Down Expand Up @@ -51,15 +51,15 @@ dependencies = [
"cachetools>=5.3",
"chardet>=5.1",
"colorama>=0.4.6",
"filelock>=3.9",
'importlib-metadata>=6; python_version < "3.8"',
"filelock>=3.10",
'importlib-metadata>=6.1; python_version < "3.8"',
"packaging>=23",
"platformdirs>=2.6.2",
"platformdirs>=3.1.1",
"pluggy>=1",
"pyproject-api>=1.5",
"pyproject-api>=1.5.1",
'tomli>=2.0.1; python_version < "3.11"',
'typing-extensions>=4.4; python_version < "3.8"',
"virtualenv>=20.17.1",
'typing-extensions>=4.5; python_version < "3.8"',
"virtualenv>=20.21",
]
optional-dependencies.docs = [
"furo>=2022.12.7",
Expand All @@ -73,21 +73,21 @@ optional-dependencies.docs = [
]
optional-dependencies.testing = [
"build[virtualenv]>=0.10",
"covdefaults>=2.2.2",
"covdefaults>=2.3",
"devpi-process>=0.3",
"diff-cover>=7.4",
"diff-cover>=7.5",
"distlib>=0.3.6",
"flaky>=3.7",
"hatch-vcs>=0.3",
"hatchling>=1.12.2",
"hatchling>=1.13",
"psutil>=5.9.4",
"pytest>=7.2.1",
"pytest>=7.2.2",
"pytest-cov>=4",
"pytest-mock>=3.10",
"pytest-xdist>=3.1",
"pytest-xdist>=3.2.1",
"re-assert>=1.1",
'time-machine>=2.9; implementation_name != "pypy"',
"wheel>=0.38.4",
"wheel>=0.40",
]
urls.Documentation = "https://tox.wiki"
urls.Homepage = "http://tox.readthedocs.org"
Expand Down
4 changes: 2 additions & 2 deletions src/tox/config/cli/parser.py
Expand Up @@ -203,11 +203,11 @@ def add_argument(*a_args: str, of_type: type[Any] | None = None, **a_kwargs: Any
excl.append((e_kwargs, arguments))
res_excl = prev_excl(**kwargs)
prev_add_arg = res_excl.add_argument
res_excl.add_argument = add_argument # type: ignore[assignment]
res_excl.add_argument = add_argument # type: ignore[method-assign]
return res_excl

prev_excl = result.add_mutually_exclusive_group
result.add_mutually_exclusive_group = add_mutually_exclusive_group # type: ignore[assignment]
result.add_mutually_exclusive_group = add_mutually_exclusive_group # type: ignore[method-assign]
excl: list[tuple[dict[str, Any], list[ArgumentArgs]]] = []
self._groups.append((args, kwargs, excl))
return result
Expand Down
4 changes: 2 additions & 2 deletions src/tox/config/loader/convert.py
Expand Up @@ -71,13 +71,13 @@ def _to_typing(self, raw: T, of_type: type[V], factory: Factory[V]) -> V:
elif origin == Union: # handle Optional values
args: list[type[Any]] = of_type.__args__ # type: ignore[attr-defined]
none = type(None)
if len(args) == 2 and none in args:
if len(args) == 2 and none in args: # type: ignore[comparison-overlap]
if isinstance(raw, str):
raw = raw.strip() # type: ignore[assignment]
if not raw:
result = None
else:
new_type = next(i for i in args if i != none) # pragma: no cover # this will always find a element
new_type = next(i for i in args if i != none) # type: ignore # pragma: no cover
result = self.to(raw, new_type, factory)
elif origin in (Literal, type(Literal)):
choice = of_type.__args__ # type: ignore[attr-defined]
Expand Down
2 changes: 1 addition & 1 deletion src/tox/pytest.py
Expand Up @@ -394,7 +394,7 @@ def matches(pattern: str, text: str, flags: int = 0) -> None:
except ImportError: # pragma: no cover # hard to test
match = re.match(pattern, text, flags)
if match is None:
warnings.warn("install the re-assert PyPI package for bette error message", UserWarning)
warnings.warn("install the re-assert PyPI package for bette error message", UserWarning, stacklevel=1)
assert match
else:
assert Matches(pattern, flags=flags) == text
Expand Down
4 changes: 2 additions & 2 deletions src/tox/report.py
Expand Up @@ -41,11 +41,11 @@ def new_start(self: Thread) -> None: # need to patch this
self.parent_ident = current_thread().ident # type: ignore[attr-defined]
old_start(self)

old_start, Thread.start = Thread.start, new_start # type: ignore[assignment]
old_start, Thread.start = Thread.start, new_start # type: ignore[method-assign]
try:
yield
finally:
Thread.start = old_start # type: ignore[assignment]
Thread.start = old_start # type: ignore[method-assign]

@property
def name(self) -> str:
Expand Down
6 changes: 3 additions & 3 deletions src/tox/tox_env/python/virtual_env/package/util.py
Expand Up @@ -3,7 +3,7 @@
from copy import deepcopy
from typing import Optional, Set, cast

from packaging.markers import Marker, Op, Value, Variable # type: ignore[attr-defined]
from packaging.markers import Marker, Op, Variable # type: ignore[attr-defined]
from packaging.requirements import Requirement


Expand Down Expand Up @@ -72,7 +72,7 @@ def _extract_extra_markers(req: Requirement) -> tuple[Requirement, set[str | Non
return req, cast(Set[Optional[str]], extra_markers) or {None}


def _get_extra(_marker: str | tuple[Variable, Op, Value]) -> str | None:
def _get_extra(_marker: str | tuple[Variable, Op, Variable]) -> str | None:
if isinstance(_marker, tuple) and len(_marker) == 3 and _marker[0].value == "extra" and _marker[1].value == "==":
return cast(str, _marker[2].value)
return _marker[2].value
return None
10 changes: 5 additions & 5 deletions tox.ini
Expand Up @@ -43,17 +43,17 @@ passenv =
PROGRAMDATA
skip_install = true
deps =
pre-commit>=2.21
pre-commit>=3.2
commands =
pre-commit run --all-files --show-diff-on-failure {posargs}
python -c 'print(r"hint: run {envbindir}{/}pre-commit install to add checks as pre-commit hook")'

[testenv:type]
description = run type check on code base
deps =
mypy==0.991
types-cachetools>=5.3
types-chardet>=5.0.4.1
mypy==1.1.1
types-cachetools>=5.3.0.4
types-chardet>=5.0.4.2
commands =
mypy src/tox
mypy tests
Expand Down Expand Up @@ -82,7 +82,7 @@ commands =
description = do a release, required posarg of the version number
skip_install = true
deps =
gitpython>=3.1.30
gitpython>=3.1.31
packaging>=23
towncrier>=22.12
commands =
Expand Down
1 change: 1 addition & 0 deletions whitelist.txt
Expand Up @@ -156,6 +156,7 @@ signum
sigterm
skipif
splitter
stacklevel
statemachine
string2lines
stringify
Expand Down

0 comments on commit 0a3d578

Please sign in to comment.