Skip to content

Commit 4b05a4e

Browse files
[pre-commit.ci] pre-commit autoupdate (#270)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.10 → v0.11.0](astral-sh/ruff-pre-commit@v0.9.10...v0.11.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c7083ee commit 4b05a4e

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
- id: blacken-docs
2727

2828
- repo: https://github.com/astral-sh/ruff-pre-commit
29-
rev: v0.9.10
29+
rev: v0.11.0
3030
hooks:
3131
- id: ruff
3232
- id: ruff-format

src/installer/_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def _process_WHEEL_file(source: WheelSource) -> Scheme: # noqa: N802
2828

2929
# Determine where archive root should go.
3030
if metadata["Root-Is-Purelib"] == "true":
31-
return cast(Scheme, "purelib")
31+
return cast("Scheme", "purelib")
3232
else:
33-
return cast(Scheme, "platlib")
33+
return cast("Scheme", "platlib")
3434

3535

3636
def _determine_scheme(
@@ -58,7 +58,7 @@ def _determine_scheme(
5858
msg_fmt = "{path} is not contained in a valid .data subdirectory."
5959
raise InvalidWheelSource(source, msg_fmt.format(path=path))
6060

61-
return cast(Scheme, scheme_name), posixpath.join(*reversed(parts[:-1]))
61+
return cast("Scheme", scheme_name), posixpath.join(*reversed(parts[:-1]))
6262

6363

6464
def install(

src/installer/records.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,5 +231,5 @@ def parse_record_file(rows: Iterable[str]) -> Iterator[tuple[str, str, str]]:
231231
# Convert Windows paths to use / for consistency
232232
elements[0] = elements[0].replace("\\", "/")
233233

234-
value = cast(tuple[str, str, str], tuple(elements))
234+
value = cast("tuple[str, str, str]", tuple(elements))
235235
yield value

src/installer/sources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def validate_record(self, *, validate_contents: bool = True) -> None:
294294
)
295295
if validate_contents:
296296
with self._zipfile.open(item, "r") as stream:
297-
if not record.validate_stream(cast(BinaryIO, stream)):
297+
if not record.validate_stream(cast("BinaryIO", stream)):
298298
issues.append(
299299
f"In {self._zipfile.filename}, hash / size of {item.filename} didn't match RECORD"
300300
)

src/installer/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
)
7777

7878
# According to https://www.python.org/dev/peps/pep-0427/#id7
79-
SCHEME_NAMES = cast(AllSchemes, ("purelib", "platlib", "headers", "scripts", "data"))
79+
SCHEME_NAMES = cast("AllSchemes", ("purelib", "platlib", "headers", "scripts", "data"))
8080

8181

8282
def parse_metadata_file(contents: str) -> Message:

0 commit comments

Comments
 (0)