Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#3448)
Browse files Browse the repository at this point in the history
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.3 → v0.8.0](astral-sh/ruff-pre-commit@v0.7.3...v0.8.0)

Signed-off-by: Bernát Gábor <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Nov 27, 2024
1 parent 5b76cdd commit a81c2cb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
hooks:
- id: validate-pyproject
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.3"
rev: "v0.8.0"
hooks:
- id: ruff-format
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def process_signature( # noqa: PLR0913
options: Options,
args: str, # noqa: ARG001
retann: str | None, # noqa: ARG001
) -> None | tuple[None, None]:
) -> tuple[None, None] | None:
# skip-member is not checked for class level docs, so disable via signature processing
return (None, None) if objtype == "class" and "__init__" in options.get("exclude-members", set()) else None

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ lint.select = [
"ALL",
]
lint.ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod"
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `arg`"
"COM812", # conflicts with formatter
"CPY", # No copyright header
Expand All @@ -166,6 +164,7 @@ lint.ignore = [
"DOC501", # broken with sphinx docs
"INP001", # no implicit namespaces here
"ISC001", # conflicts with formatter
"LOG015", # we require use of the root logger for reporting
"PLR0914", ## Too many local variables
"PLR0917", ## Too many positional arguments
"S104", # Possible binding to all interfaces
Expand Down
6 changes: 3 additions & 3 deletions src/tox/session/env_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CliEnv: # noqa: PLW1641
as ``<env_list>``.
"""

def __init__(self, value: None | list[str] | str = None) -> None:
def __init__(self, value: list[str] | str | None = None) -> None:
if isinstance(value, str):
value = StrConvert().to(value, of_type=List[str], factory=None)
self._names: list[str] | None = value
Expand Down Expand Up @@ -148,14 +148,14 @@ def __init__(self, state: State) -> None:
self.on_empty_fallback_py = True
self._warned_about: set[str] = set() #: shared set of skipped environments that were already warned about
self._state = state
self._defined_envs_: None | dict[str, _ToxEnvInfo] = None
self._defined_envs_: dict[str, _ToxEnvInfo] | None = None
self._pkg_env_counter: Counter[str] = Counter()
from tox.plugin.manager import MANAGER # noqa: PLC0415

self._manager = MANAGER
self._log_handler = self._state._options.log_handler # noqa: SLF001
self._journal = self._state._journal # noqa: SLF001
self._provision: None | tuple[bool, str] = None
self._provision: tuple[bool, str] | None = None

self._state.conf.core.add_config("labels", Dict[str, EnvList], {}, "core labels")
tox_env_filter_regex = getattr(state.conf.options, "skip_env", "").strip()
Expand Down
2 changes: 1 addition & 1 deletion tests/session/cmd/test_sequential.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_result_json_sequential(
expected_pkg = {"pip", "setuptools", "wheel", "a"}
assert {i[: i.find("==")] if "@" not in i else "a" for i in packaging_installed} == expected_pkg
install_package = log_report["testenvs"]["py"].pop("installpkg")
assert re.match("^[a-fA-F0-9]{64}$", install_package.pop("sha256"))
assert re.match(r"^[a-fA-F0-9]{64}$", install_package.pop("sha256"))
assert install_package == {"basename": "a-1.0-py3-none-any.whl", "type": "file"}

expected = {
Expand Down

0 comments on commit a81c2cb

Please sign in to comment.