Skip to content

Commit a81c2cb

Browse files
[pre-commit.ci] pre-commit autoupdate (#3448)
updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.3 → v0.8.0](astral-sh/ruff-pre-commit@v0.7.3...v0.8.0) Signed-off-by: Bernát Gábor <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 5b76cdd commit a81c2cb

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
hooks:
2424
- id: validate-pyproject
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: "v0.7.3"
26+
rev: "v0.8.0"
2727
hooks:
2828
- id: ruff-format
2929
- id: ruff

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def process_signature( # noqa: PLR0913
8888
options: Options,
8989
args: str, # noqa: ARG001
9090
retann: str | None, # noqa: ARG001
91-
) -> None | tuple[None, None]:
91+
) -> tuple[None, None] | None:
9292
# skip-member is not checked for class level docs, so disable via signature processing
9393
return (None, None) if objtype == "class" and "__init__" in options.get("exclude-members", set()) else None
9494

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ lint.select = [
153153
"ALL",
154154
]
155155
lint.ignore = [
156-
"ANN101", # Missing type annotation for `self` in method
157-
"ANN102", # Missing type annotation for `cls` in classmethod"
158156
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `arg`"
159157
"COM812", # conflicts with formatter
160158
"CPY", # No copyright header
@@ -166,6 +164,7 @@ lint.ignore = [
166164
"DOC501", # broken with sphinx docs
167165
"INP001", # no implicit namespaces here
168166
"ISC001", # conflicts with formatter
167+
"LOG015", # we require use of the root logger for reporting
169168
"PLR0914", ## Too many local variables
170169
"PLR0917", ## Too many positional arguments
171170
"S104", # Possible binding to all interfaces

src/tox/session/env_select.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class CliEnv: # noqa: PLW1641
4646
as ``<env_list>``.
4747
"""
4848

49-
def __init__(self, value: None | list[str] | str = None) -> None:
49+
def __init__(self, value: list[str] | str | None = None) -> None:
5050
if isinstance(value, str):
5151
value = StrConvert().to(value, of_type=List[str], factory=None)
5252
self._names: list[str] | None = value
@@ -148,14 +148,14 @@ def __init__(self, state: State) -> None:
148148
self.on_empty_fallback_py = True
149149
self._warned_about: set[str] = set() #: shared set of skipped environments that were already warned about
150150
self._state = state
151-
self._defined_envs_: None | dict[str, _ToxEnvInfo] = None
151+
self._defined_envs_: dict[str, _ToxEnvInfo] | None = None
152152
self._pkg_env_counter: Counter[str] = Counter()
153153
from tox.plugin.manager import MANAGER # noqa: PLC0415
154154

155155
self._manager = MANAGER
156156
self._log_handler = self._state._options.log_handler # noqa: SLF001
157157
self._journal = self._state._journal # noqa: SLF001
158-
self._provision: None | tuple[bool, str] = None
158+
self._provision: tuple[bool, str] | None = None
159159

160160
self._state.conf.core.add_config("labels", Dict[str, EnvList], {}, "core labels")
161161
tox_env_filter_regex = getattr(state.conf.options, "skip_env", "").strip()

tests/session/cmd/test_sequential.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_result_json_sequential(
117117
expected_pkg = {"pip", "setuptools", "wheel", "a"}
118118
assert {i[: i.find("==")] if "@" not in i else "a" for i in packaging_installed} == expected_pkg
119119
install_package = log_report["testenvs"]["py"].pop("installpkg")
120-
assert re.match("^[a-fA-F0-9]{64}$", install_package.pop("sha256"))
120+
assert re.match(r"^[a-fA-F0-9]{64}$", install_package.pop("sha256"))
121121
assert install_package == {"basename": "a-1.0-py3-none-any.whl", "type": "file"}
122122

123123
expected = {

0 commit comments

Comments
 (0)