Skip to content

Commit 063161f

Browse files
[pre-commit.ci] pre-commit autoupdate (#1468)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/charliermarsh/ruff-pre-commit: v0.0.260 → v0.0.261](astral-sh/ruff-pre-commit@v0.0.260...v0.0.261) - [github.com/pre-commit/mirrors-mypy: v1.1.1 → v1.2.0](pre-commit/mirrors-mypy@v1.1.1...v1.2.0) * chore: update for mypy bug Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 2246313 commit 063161f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ repos:
1919
- id: black
2020

2121
- repo: https://github.com/charliermarsh/ruff-pre-commit
22-
rev: v0.0.260
22+
rev: v0.0.261
2323
hooks:
2424
- id: ruff
25-
args: ["--fix"]
25+
args: ["--fix", "--show-fixes"]
2626

2727
- repo: https://github.com/asottile/setup-cfg-fmt
2828
rev: v2.2.0
@@ -31,7 +31,7 @@ repos:
3131
args: [--include-version-classifiers, --max-py-version=3.11]
3232

3333
- repo: https://github.com/pre-commit/mirrors-mypy
34-
rev: v1.1.1
34+
rev: v1.2.0
3535
hooks:
3636
- id: mypy
3737
name: mypy 3.7 on cibuildwheel/

cibuildwheel/oci_container.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def copy_into(self, from_path: Path, to_path: PurePath) -> None:
166166
cwd=from_path,
167167
)
168168
else:
169+
exec_process: subprocess.Popen[bytes]
169170
with subprocess.Popen(
170171
[
171172
self.engine,
@@ -178,10 +179,10 @@ def copy_into(self, from_path: Path, to_path: PurePath) -> None:
178179
],
179180
stdin=subprocess.PIPE,
180181
) as exec_process:
181-
exec_process.stdin = cast(IO[bytes], exec_process.stdin)
182-
182+
assert exec_process.stdin
183183
with open(from_path, "rb") as from_file:
184-
shutil.copyfileobj(from_file, exec_process.stdin)
184+
# Bug in mypy, https://github.com/python/mypy/issues/15031
185+
shutil.copyfileobj(from_file, exec_process.stdin) # type: ignore[misc]
185186

186187
exec_process.stdin.close()
187188
exec_process.wait()

0 commit comments

Comments
 (0)