Skip to content
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions src/tox/plugin/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.
Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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 before executing an installation command.

Expand Down
10 changes: 5 additions & 5 deletions src/tox/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion tests/config/test_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion tests/type_check/add_config_container_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading