Skip to content

Commit 44271c4

Browse files
pre-commit-ci[bot]radoering
authored andcommitted
[pre-commit.ci] pre-commit autoupdate
updates: - [github.com/pre-commit/pre-commit: v4.1.0 → v4.2.0](pre-commit/pre-commit@v4.1.0...v4.2.0) - [github.com/astral-sh/ruff-pre-commit: v0.9.7 → v0.11.2](astral-sh/ruff-pre-commit@v0.9.7...v0.11.2) - [github.com/woodruffw/zizmor-pre-commit: v1.3.1 → v1.5.2](zizmorcore/zizmor-pre-commit@v1.3.1...v1.5.2)
1 parent bca92d5 commit 44271c4

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ repos:
2323
- id: check-docstring-first
2424

2525
- repo: https://github.com/pre-commit/pre-commit
26-
rev: v4.1.0
26+
rev: v4.2.0
2727
hooks:
2828
- id: validate_manifest
2929

3030
- repo: https://github.com/astral-sh/ruff-pre-commit
31-
rev: v0.9.7
31+
rev: v0.11.2
3232
hooks:
3333
- id: ruff
3434
- id: ruff-format
3535

3636
- repo: https://github.com/woodruffw/zizmor-pre-commit
37-
rev: v1.3.1
37+
rev: v1.5.2
3838
hooks:
3939
- id: zizmor
4040
# types and files can be removed with https://github.com/woodruffw/zizmor-pre-commit/pull/2

src/poetry/console/application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def _sort_global_options(self, io: IO) -> None:
372372
and reordered.
373373
:return: Nothing.
374374
"""
375-
original_input = cast(ArgvInput, io.input)
375+
original_input = cast("ArgvInput", io.input)
376376
tokens: list[str] = original_input._tokens
377377

378378
parser = argparse.ArgumentParser(add_help=False)
@@ -425,7 +425,7 @@ def _configure_run_command(self, io: IO) -> None:
425425
command_name = io.input.first_argument
426426

427427
if command_name == "run":
428-
original_input = cast(ArgvInput, io.input)
428+
original_input = cast("ArgvInput", io.input)
429429
tokens: list[str] = original_input._tokens
430430

431431
if "--" in tokens:

src/poetry/console/commands/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class UpdateCommand(InstallerCommand):
4545
def handle(self) -> int:
4646
packages = self.argument("packages")
4747
if packages:
48-
self.installer.whitelist({name: "*" for name in packages})
48+
self.installer.whitelist(dict.fromkeys(packages, "*"))
4949

5050
self.installer.only_groups(self.activated_groups)
5151
self.installer.dry_run(self.option("dry-run"))

src/poetry/utils/env/python/manager.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,27 +164,27 @@ def python(self) -> findpython.PythonVersion:
164164

165165
@property
166166
def name(self) -> str:
167-
return cast(str, self._python.name)
167+
return cast("str", self._python.name)
168168

169169
@property
170170
def executable(self) -> Path:
171-
return cast(Path, self._python.interpreter)
171+
return cast("Path", self._python.interpreter)
172172

173173
@property
174174
def implementation(self) -> str:
175-
return cast(str, self._python.implementation.lower())
175+
return cast("str", self._python.implementation.lower())
176176

177177
@property
178178
def major(self) -> int:
179-
return cast(int, self._python.major)
179+
return cast("int", self._python.major)
180180

181181
@property
182182
def minor(self) -> int:
183-
return cast(int, self._python.minor)
183+
return cast("int", self._python.minor)
184184

185185
@property
186186
def patch(self) -> int:
187-
return cast(int, self._python.patch)
187+
return cast("int", self._python.patch)
188188

189189
@property
190190
def version(self) -> Version:

tests/utils/env/python/test_python_installer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
from pathlib import Path
43
from subprocess import CalledProcessError
54
from typing import TYPE_CHECKING
65
from typing import cast
@@ -16,6 +15,7 @@
1615

1716

1817
if TYPE_CHECKING:
18+
from pathlib import Path
1919
from unittest.mock import MagicMock
2020

2121
from pytest_mock import MockerFixture
@@ -68,7 +68,7 @@ def implementation(self) -> str:
6868

6969
@property
7070
def executable(self) -> Path:
71-
return cast(Path, mocker.Mock(as_posix=lambda: "/path/to/bad/python"))
71+
return cast("Path", mocker.Mock(as_posix=lambda: "/path/to/bad/python"))
7272

7373
@property
7474
def version(self) -> None:

0 commit comments

Comments
 (0)