Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 27, 2024
1 parent 6ed978e commit 8a5d4ac
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,6 @@ format.docstring-code-format = true
lint.select = [
"ALL",
]
lint.per-file-ignores."tests/**/*.py" = [
"D", # don't care about documentation in tests
"FBT", # don"t care about booleans as positional arguments in tests
"INP001", # no implicit namespace
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"S101", # asserts allowed in tests...
"S603", # `subprocess` call: check for execution of untrusted input
]
lint.isort = { known-first-party = [
"tox",
"tests",
], required-imports = [
"from __future__ import annotations",
] }
lint.ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod"
Expand All @@ -149,6 +135,20 @@ lint.ignore = [
"S104", # Possible binding to all interfaces
"S404", # Using subprocess is alright.
]
lint.per-file-ignores."tests/**/*.py" = [
"D", # don't care about documentation in tests
"FBT", # don"t care about booleans as positional arguments in tests
"INP001", # no implicit namespace
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"S101", # asserts allowed in tests...
"S603", # `subprocess` call: check for execution of untrusted input
]
lint.isort = { known-first-party = [
"tox",
"tests",
], required-imports = [
"from __future__ import annotations",
] }
lint.preview = true

[tool.codespell]
Expand Down
2 changes: 1 addition & 1 deletion src/tox/config/loader/ini/replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _replace_ref(env: str | None) -> Pattern[str]:
)


def replace_reference( # noqa: PLR0912, C901
def replace_reference( # noqa: C901
conf: Config,
loader: IniLoader,
value: str,
Expand Down
3 changes: 1 addition & 2 deletions src/tox/execute/local_sub_process/read_via_thread_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

from __future__ import annotations # pragma: win32 cover

import _overlapped # type: ignore[import] # pragma: win32 cover # noqa: PLC2701
import logging # pragma: win32 cover
from asyncio.windows_utils import BUFSIZE # type: ignore[attr-defined] # pragma: win32 cover
from time import sleep # pragma: win32 cover
from typing import Callable # pragma: win32 cover

import _overlapped # type: ignore[import] # pragma: win32 cover # noqa: PLC2701

from .read_via_thread import ReadViaThread # pragma: win32 cover

# mypy: warn-unused-ignores=false
Expand Down
2 changes: 1 addition & 1 deletion src/tox/tox_env/python/pip/req/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


class ParsedRequirement:
def __init__(self, req: str, options: dict[str, Any], from_file: str, lineno: int) -> None: # noqa: PLR0912
def __init__(self, req: str, options: dict[str, Any], from_file: str, lineno: int) -> None:
req = req.encode("utf-8").decode("utf-8")
try:
self._requirement: Requirement | Path | str = Requirement(req)
Expand Down

0 comments on commit 8a5d4ac

Please sign in to comment.