Skip to content

Commit 5ec42c6

Browse files
[pre-commit.ci] pre-commit autoupdate (#3196)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bernát Gábor <[email protected]> Co-authored-by: Bernát Gábor <[email protected]>
1 parent c51179c commit 5ec42c6

File tree

23 files changed

+41
-41
lines changed

23 files changed

+41
-41
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: tox-ini-fmt
1818
args: ["-p", "fix"]
1919
- repo: https://github.com/tox-dev/pyproject-fmt
20-
rev: 1.6.0
20+
rev: 1.7.0
2121
hooks:
2222
- id: pyproject-fmt
2323
additional_dependencies: ["tox>=4.11.4"]
@@ -27,7 +27,7 @@ repos:
2727
- id: blacken-docs
2828
additional_dependencies: [black==23.12.1]
2929
- repo: https://github.com/astral-sh/ruff-pre-commit
30-
rev: v0.1.13
30+
rev: v0.1.14
3131
hooks:
3232
- id: ruff-format
3333
- id: ruff

src/tox/config/cli/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ def _get_parser_doc() -> ToxParser:
8989

9090

9191
__all__ = (
92-
"get_options",
9392
"Options",
93+
"get_options",
9494
)

src/tox/config/cli/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def add_core_arguments(parser: ArgumentParser) -> None:
345345

346346
__all__ = (
347347
"DEFAULT_VERBOSITY",
348+
"HelpFormatter",
348349
"Parsed",
349350
"ToxParser",
350-
"HelpFormatter",
351351
)

src/tox/config/loader/ini/factor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def is_negated(factor: str) -> bool:
9494

9595

9696
__all__ = (
97-
"filter_for_env",
98-
"find_envs",
9997
"expand_factors",
10098
"extend_factors",
99+
"filter_for_env",
100+
"find_envs",
101101
)

src/tox/config/loader/ini/replace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ def replace_tty(args: list[str]) -> str:
346346

347347

348348
__all__ = (
349-
"find_replace_expr",
350349
"MatchArg",
351350
"MatchError",
352351
"MatchExpression",
352+
"find_replace_expr",
353353
"replace",
354354
)

src/tox/config/of_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def __eq__(self, o: object) -> bool:
122122

123123

124124
__all__ = [
125-
"ConfigLoadArgs",
125+
"ConfigConstantDefinition",
126126
"ConfigDefinition",
127127
"ConfigDynamicDefinition",
128-
"ConfigConstantDefinition",
128+
"ConfigLoadArgs",
129129
]

src/tox/config/source/ini_section.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def names(self) -> list[str]:
2323
CORE = IniSection(None, "tox")
2424

2525
__all__ = [
26-
"IniSection",
2726
"CORE",
28-
"TEST_ENV_PREFIX",
2927
"PKG_ENV_PREFIX",
28+
"TEST_ENV_PREFIX",
29+
"IniSection",
3030
]

src/tox/execute/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,10 @@ def out_err(self) -> tuple[str, str]:
299299

300300
__all__ = (
301301
"ContentHandler",
302-
"Outcome",
303302
"Execute",
304303
"ExecuteInstance",
305304
"ExecuteOptions",
306305
"ExecuteStatus",
306+
"Outcome",
307307
"StdinSource",
308308
)

src/tox/execute/local_sub_process/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def write_stdin(self, content: str) -> None:
109109
try:
110110
if sys.platform == "win32": # explicit check for mypy # pragma: win32 cover
111111
# on Windows we have a PipeHandle object here rather than a file stream
112-
import _overlapped # type: ignore[import] # noqa: PLC0415
112+
import _overlapped # type: ignore[import] # noqa: PLC0415,PLC2701
113113

114114
ov = _overlapped.Overlapped(0)
115115
ov.WriteFile(stdin.handle, bytes_content) # type: ignore[attr-defined]
@@ -219,9 +219,9 @@ def __enter__(self) -> ExecuteStatus:
219219
status = LocalSubprocessExecuteStatus(self.options, self._out, self._err, process)
220220
drain, pid = self._on_exit_drain, self.process.pid
221221
self._read_stderr = ReadViaThread(stderr.send(process), self.err_handler, name=f"err-{pid}", drain=drain)
222-
self._read_stderr.__enter__() # noqa: PLC2801
222+
self._read_stderr.__enter__()
223223
self._read_stdout = ReadViaThread(stdout.send(process), self.out_handler, name=f"out-{pid}", drain=drain)
224-
self._read_stdout.__enter__() # noqa: PLC2801
224+
self._read_stdout.__enter__()
225225

226226
if sys.platform == "win32": # explicit check for mypy: # pragma: win32 cover
227227
process.stderr.read = self._read_stderr._drain_stream # type: ignore[assignment,union-attr] # noqa: SLF001
@@ -322,10 +322,10 @@ def _pty(key: str) -> tuple[int, int] | None:
322322

323323

324324
__all__ = (
325-
"SIG_INTERRUPT",
326325
"CREATION_FLAGS",
326+
"SIG_INTERRUPT",
327327
"LocalSubProcessExecuteInstance",
328328
"LocalSubProcessExecutor",
329-
"LocalSubprocessExecuteStatus",
330329
"LocalSubprocessExecuteFailedStatus",
330+
"LocalSubprocessExecuteStatus",
331331
)

src/tox/execute/local_sub_process/read_via_thread_windows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from time import sleep # pragma: win32 cover
88
from typing import Callable # pragma: win32 cover
99

10-
import _overlapped # type: ignore[import] # pragma: win32 cover
10+
import _overlapped # type: ignore[import] # pragma: win32 cover # noqa: PLC2701
1111

1212
from .read_via_thread import ReadViaThread # pragma: win32 cover
1313

src/tox/execute/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def shell_cmd(cmd: Sequence[str]) -> str:
7979

8080

8181
__all__ = (
82-
"StdinSource",
8382
"ExecuteRequest",
83+
"StdinSource",
8484
"shell_cmd",
8585
)

src/tox/journal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def write_journal(path: Path | None, journal: Journal) -> None:
1717

1818

1919
__all__ = (
20-
"Journal",
2120
"EnvJournal",
21+
"Journal",
2222
"write_journal",
2323
)

src/tox/plugin/spec.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ def tox_env_teardown(tox_env: ToxEnv) -> None: # noqa: ARG001
102102

103103
__all__ = [
104104
"NAME",
105-
"tox_register_tox_env",
106-
"tox_add_option",
107105
"tox_add_core_config",
108106
"tox_add_env_config",
109-
"tox_before_run_commands",
107+
"tox_add_option",
110108
"tox_after_run_commands",
111-
"tox_on_install",
109+
"tox_before_run_commands",
112110
"tox_env_teardown",
111+
"tox_on_install",
112+
"tox_register_tox_env",
113113
]

src/tox/pytest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, cast
1717

1818
import pytest
19-
from _pytest.fixtures import SubRequest
19+
from _pytest.fixtures import SubRequest # noqa: PLC2701
2020
from devpi_process import IndexServer
2121
from virtualenv.info import fs_supports_symlink
2222

@@ -527,12 +527,12 @@ def register_inline_plugin(mocker: MockerFixture, *args: Callable[..., Any]) ->
527527
__all__ = (
528528
"CaptureFixture",
529529
"LogCaptureFixture",
530-
"TempPathFactory",
531530
"MonkeyPatch",
532531
"SubRequest",
533-
"ToxRunOutcome",
532+
"TempPathFactory",
534533
"ToxProject",
535534
"ToxProjectCreator",
535+
"ToxRunOutcome",
536536
"check_os_environ",
537537
"register_inline_plugin",
538538
)

src/tox/session/cmd/run/single.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def run_command_set(
126126

127127

128128
__all__ = (
129-
"run_one",
130-
"run_command_set",
131129
"ToxEnvRunResult",
130+
"run_command_set",
131+
"run_one",
132132
)

src/tox/session/env_select.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def _mark_provision(self, on: bool, provision_tox_env: str) -> None: # noqa: FB
424424

425425

426426
__all__ = [
427-
"register_env_select_flags",
428-
"EnvSelector",
429427
"CliEnv",
428+
"EnvSelector",
429+
"register_env_select_flags",
430430
]

src/tox/tox_env/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(self, create_args: ToxEnvCreateArgs) -> None:
6060

6161
def __getattribute__(self, name: str) -> Any:
6262
# the packaging class might be used by multiple environments in parallel, hold a lock for operations on it
63-
obj = object.__getattribute__(self, name) # noqa: PLC2801
63+
obj = object.__getattribute__(self, name)
6464
if isinstance(obj, MethodType):
6565
obj = _lock_method(self._thread_lock, self._file_lock, obj)
6666
return obj

src/tox/tox_env/python/pip/req/file.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# Matches environment variable-style values in '${MY_VARIABLE_1}' with the variable name consisting of only uppercase
2222
# letters, digits or the '_' (underscore). This follows the POSIX standard defined in IEEE Std 1003.1, 2013 Edition.
2323
_ENV_VAR_RE = re.compile(r"(?P<var>\${(?P<name>[A-Z0-9_]+)})")
24-
_SCHEME_RE = re.compile(r"^(http|https|file):", re.I)
24+
_SCHEME_RE = re.compile(r"^(http|https|file):", re.IGNORECASE)
2525
_COMMENT_RE = re.compile(r"(^|\s+)#.*$")
2626
# https://www.python.org/dev/peps/pep-0508/#extras
2727
_EXTRA_PATH = re.compile(r"(.*)\[([-._,\sa-zA-Z0-9]*)]")
@@ -484,7 +484,7 @@ def _option_to_args(self, opt: Namespace) -> list[str]: # noqa: C901, PLR0912,
484484

485485

486486
__all__ = (
487-
"RequirementsFile",
488-
"ReqFileLines",
489487
"ParsedRequirement",
488+
"ReqFileLines",
489+
"RequirementsFile",
490490
)

src/tox/tox_env/python/pip/req_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,6 @@ def factory(cls, root: Path, raw: object) -> PythonDeps:
153153
}
154154

155155
__all__ = (
156-
"PythonDeps",
157156
"ONE_ARG",
157+
"PythonDeps",
158158
)

src/tox/tox_env/python/virtual_env/package/pyproject.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@
5656

5757
class ToxBackendFailed(Fail, BackendFailed):
5858
def __init__(self, backend_failed: BackendFailed) -> None:
59-
Fail.__init__(self) # noqa: PLC2801
59+
Fail.__init__(self)
6060
result: dict[str, Any] = {
6161
"code": backend_failed.code,
6262
"exc_type": backend_failed.exc_type,
6363
"exc_msg": backend_failed.exc_msg,
6464
}
65-
BackendFailed.__init__( # noqa: PLC2801
65+
BackendFailed.__init__(
6666
self,
6767
result,
6868
backend_failed.out,

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def demo_pkg_inline_wheel(tmp_path_factory: pytest.TempPathFactory, demo_pkg_inl
136136

137137

138138
def build_pkg(dist_dir: Path, of: Path, distributions: list[str], isolation: bool = True) -> Path:
139-
from build.__main__ import build_package # noqa: PLC0415
139+
from build.__main__ import build_package # noqa: PLC0415,PLC2701
140140

141141
build_package(str(of), str(dist_dir), distributions=distributions, isolation=isolation)
142142
return next(dist_dir.iterdir())

tests/session/test_env_select.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pytest
77

88
from tox.config.cli.parse import get_options
9-
from tox.session.env_select import _DYNAMIC_ENV_FACTORS, CliEnv, EnvSelector
9+
from tox.session.env_select import _DYNAMIC_ENV_FACTORS, CliEnv, EnvSelector # noqa: PLC2701
1010
from tox.session.state import State
1111

1212
if TYPE_CHECKING:

tests/util/test_ci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from tox.util.ci import _ENV_VARS, is_ci
5+
from tox.util.ci import _ENV_VARS, is_ci # noqa: PLC2701
66

77

88
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)