Skip to content

Commit 5a23077

Browse files
committed
Fixed review issues
1 parent 768850d commit 5a23077

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

src/tox/config/cli/parser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ def _add_provision_arguments(self, sub_parser: ToxParser) -> None: # noqa: PLR6
200200
metavar="path",
201201
of_type=Path,
202202
default=None,
203-
help="write a test report file with detailed information about all commands and results involved (format determined by report_format config or defaults to JSON)",
203+
help=(
204+
"write a test report file with detailed information about all commands and results involved "
205+
"(format determined by report_format config or defaults to JSON)"
206+
),
204207
)
205208

206209
class SeedAction(Action):

src/tox/report/config.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22

33
from __future__ import annotations
44

5+
from typing import TYPE_CHECKING
6+
57
from tox.plugin import impl
68

9+
if TYPE_CHECKING:
10+
from tox.config.sets import ConfigSet, EnvConfigSet
11+
from tox.session.state import State
12+
713

814
@impl
9-
def tox_add_core_config(core_conf, state) -> None: # noqa: ARG001
15+
def tox_add_core_config(core_conf: ConfigSet, state: State) -> None: # noqa: ARG001
1016
"""Add report_format configuration to core config."""
1117
core_conf.add_config(
1218
keys=["report_format"],
@@ -17,12 +23,12 @@ def tox_add_core_config(core_conf, state) -> None: # noqa: ARG001
1723

1824

1925
@impl
20-
def tox_add_env_config(env_conf, state) -> None: # noqa: ARG001
26+
def tox_add_env_config(env_conf: EnvConfigSet, state: State) -> None: # noqa: ARG001
2127
"""Add report_format configuration to environment config (inherits from core if not set)."""
2228
env_conf.add_config(
2329
keys=["report_format"],
2430
of_type=str | None,
25-
default=lambda conf, env_name: conf.core["report_format"],
31+
default=lambda conf, _env_name: conf.core["report_format"],
2632
desc="Format for test reports for this environment (inherits from core config if not set).",
2733
)
2834

src/tox/report/formatters/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def name(self) -> str:
2424
def file_extension(self) -> str:
2525
return ".json"
2626

27-
def format(self, journal: Journal, output_path: Path | None = None) -> str | None:
27+
def format(self, journal: Journal, output_path: Path | None = None) -> str | None: # noqa: PLR6301
2828
content = journal.content
2929
json_content = json.dumps(content, indent=2, ensure_ascii=False)
3030

0 commit comments

Comments
 (0)