diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89e0e8200..ab38d2b7b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.1 + rev: 0.29.2 hooks: - id: check-github-workflows args: ["--verbose"] @@ -24,7 +24,7 @@ repos: hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.5.7" + rev: "v0.6.3" hooks: - id: ruff-format - id: ruff diff --git a/src/tox/plugin/spec.py b/src/tox/plugin/spec.py index 54b76ddc4..c421c6ac7 100644 --- a/src/tox/plugin/spec.py +++ b/src/tox/plugin/spec.py @@ -18,7 +18,7 @@ @_spec -def tox_register_tox_env(register: ToxEnvRegister) -> None: # noqa: ARG001 +def tox_register_tox_env(register: ToxEnvRegister) -> None: """ Register new tox environment type. You can register: @@ -30,7 +30,7 @@ def tox_register_tox_env(register: ToxEnvRegister) -> None: # noqa: ARG001 @_spec -def tox_add_option(parser: ToxParser) -> None: # noqa: ARG001 +def tox_add_option(parser: ToxParser) -> None: """ Add a command line argument. This is the first hook to be called, right after the logging setup and config source discovery. @@ -40,7 +40,7 @@ def tox_add_option(parser: ToxParser) -> None: # noqa: ARG001 @_spec -def tox_add_core_config(core_conf: ConfigSet, state: State) -> None: # noqa: ARG001 +def tox_add_core_config(core_conf: ConfigSet, state: State) -> None: """ Called when the core configuration is built for a tox environment. @@ -50,7 +50,7 @@ def tox_add_core_config(core_conf: ConfigSet, state: State) -> None: # noqa: AR @_spec -def tox_add_env_config(env_conf: EnvConfigSet, state: State) -> None: # noqa: ARG001 +def tox_add_env_config(env_conf: EnvConfigSet, state: State) -> None: """ Called when configuration is built for a tox environment. @@ -60,7 +60,7 @@ def tox_add_env_config(env_conf: EnvConfigSet, state: State) -> None: # noqa: A @_spec -def tox_before_run_commands(tox_env: ToxEnv) -> None: # noqa: ARG001 +def tox_before_run_commands(tox_env: ToxEnv) -> None: """ Called before the commands set is executed. @@ -69,7 +69,7 @@ def tox_before_run_commands(tox_env: ToxEnv) -> None: # noqa: ARG001 @_spec -def tox_after_run_commands(tox_env: ToxEnv, exit_code: int, outcomes: list[Outcome]) -> None: # noqa: ARG001 +def tox_after_run_commands(tox_env: ToxEnv, exit_code: int, outcomes: list[Outcome]) -> None: """ Called after the commands set is executed. @@ -80,7 +80,7 @@ def tox_after_run_commands(tox_env: ToxEnv, exit_code: int, outcomes: list[Outco @_spec -def tox_on_install(tox_env: ToxEnv, arguments: Any, section: str, of_type: str) -> None: # noqa: ARG001 +def tox_on_install(tox_env: ToxEnv, arguments: Any, section: str, of_type: str) -> None: """ Called before executing an installation command. @@ -92,7 +92,7 @@ def tox_on_install(tox_env: ToxEnv, arguments: Any, section: str, of_type: str) @_spec -def tox_env_teardown(tox_env: ToxEnv) -> None: # noqa: ARG001 +def tox_env_teardown(tox_env: ToxEnv) -> None: """ Called after a tox environment has been teared down. diff --git a/src/tox/pytest.py b/src/tox/pytest.py index 2e6648630..54503e300 100644 --- a/src/tox/pytest.py +++ b/src/tox/pytest.py @@ -53,7 +53,7 @@ @pytest.fixture(autouse=True) -def ensure_logging_framework_not_altered() -> Iterator[None]: # noqa: PT004 +def ensure_logging_framework_not_altered() -> Iterator[None]: before_handlers = list(LOGGER.handlers) yield LOGGER.handlers = before_handlers @@ -109,14 +109,14 @@ def check_os_environ() -> Iterator[None]: @pytest.fixture(autouse=True) -def check_os_environ_stable(monkeypatch: pytest.MonkeyPatch) -> Iterator[None]: # noqa: PT004 +def check_os_environ_stable(monkeypatch: pytest.MonkeyPatch) -> Iterator[None]: with check_os_environ(): yield monkeypatch.undo() @pytest.fixture(autouse=True) -def no_color(monkeypatch: pytest.MonkeyPatch, check_os_environ_stable: None) -> None: # noqa: ARG001, PT004 +def no_color(monkeypatch: pytest.MonkeyPatch, check_os_environ_stable: None) -> None: # noqa: ARG001 monkeypatch.setenv("NO_COLOR", "yes") @@ -295,7 +295,7 @@ def __repr__(self) -> str: @pytest.fixture(autouse=True, scope="session") -def enable_pep517_backend_coverage() -> Iterator[None]: # noqa: PT004 +def enable_pep517_backend_coverage() -> Iterator[None]: try: import coverage # noqa: F401, PLC0415 except ImportError: # pragma: no cover @@ -482,7 +482,7 @@ def pypi_server(tmp_path_factory: pytest.TempPathFactory) -> Iterator[IndexServe @pytest.fixture(scope="session") -def _invalid_index_fake_port() -> int: # noqa: PT005 +def _invalid_index_fake_port() -> int: with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as socket_handler: socket_handler.bind(("", 0)) return cast(int, socket_handler.getsockname()[1]) diff --git a/tests/config/test_sets.py b/tests/config/test_sets.py index c92eeeea2..91aec92c1 100644 --- a/tests/config/test_sets.py +++ b/tests/config/test_sets.py @@ -23,7 +23,7 @@ @pytest.fixture(name="conf_builder") -def _conf_builder(tox_ini_conf: ToxIniCreator) -> ConfBuilder: # noqa: PT005 +def _conf_builder(tox_ini_conf: ToxIniCreator) -> ConfBuilder: def _make(conf_str: str) -> ConfigSet: return tox_ini_conf(f"[tox]\nenvlist=py39\n[testenv]\n{conf_str}").get_env("py39") diff --git a/tests/type_check/add_config_container_factory.py b/tests/type_check/add_config_container_factory.py index 81b0a710e..3193c07b1 100644 --- a/tests/type_check/add_config_container_factory.py +++ b/tests/type_check/add_config_container_factory.py @@ -9,7 +9,7 @@ class EnvDockerConfigSet(ConfigSet): def register_config(self) -> None: - def factory(container_name: object) -> str: # noqa: ARG001 + def factory(container_name: object) -> str: raise NotImplementedError self.add_config(