Skip to content

Commit 763366a

Browse files
[pre-commit.ci] pre-commit autoupdate (#596)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.11 → v0.11.12](astral-sh/ruff-pre-commit@v0.11.11...v0.11.12) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.0](pre-commit/mirrors-mypy@v1.15.0...v1.16.0) * fix typing * Update .pre-commit-config.yaml * Update .pre-commit-config.yaml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: mayeut <[email protected]>
1 parent 8b41121 commit 763366a

File tree

6 files changed

+17
-10
lines changed

6 files changed

+17
-10
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33

4-
default_language_version:
5-
python: python3.9
6-
74
exclude: ^src/auditwheel/_vendor/
85

96
repos:
@@ -24,16 +21,22 @@ repos:
2421
- id: trailing-whitespace
2522

2623
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.11.11
24+
rev: v0.11.12
2825
hooks:
2926
- id: ruff
3027
args: ["--fix", "--show-fixes"]
3128
- id: ruff-format
3229

3330
- repo: https://github.com/pre-commit/mirrors-mypy
34-
rev: v1.15.0
31+
rev: v1.16.0
3532
hooks:
3633
- id: mypy
37-
exclude: ^tests/integration/.*/.*$|^scripts/calculate_symbol_versions.py$
34+
exclude: tests/integration/.*/.*|tests/integration/quick_check_numpy.py|tests/unit/test_wheel_abi.py|scripts/calculate_symbol_versions.py
35+
args: ["--python-version=3.9"]
3836
additional_dependencies:
37+
- nox
38+
- packaging
39+
- pyelftools
40+
- pytest
41+
- types-docker
3942
- types-requests

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
sdist = ""
2020

2121

22-
@nox.session(python=["3.9"], reuse_venv=True)
22+
@nox.session(reuse_venv=True)
2323
def lint(session: nox.Session) -> None:
2424
"""
2525
Run linters on the codebase.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ warn_redundant_casts = true
7373
warn_unreachable = false
7474
warn_unused_configs = true
7575
warn_unused_ignores = true
76+
untyped_calls_exclude = ["elftools.elf.elffile.ELFFile", "elftools.elf.sections.NoteSection"]
7677

7778
[[tool.mypy.overrides]]
7879
module = "auditwheel.*"

src/auditwheel/repair.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ def repair_wheel(
5353
out_dir = out_dir.resolve(strict=True)
5454
wheel_fname = wheel_path.name
5555

56+
output_wheel = out_dir / wheel_fname
5657
with InWheelCtx(wheel_path) as ctx:
57-
ctx.out_wheel = out_dir / wheel_fname
58+
ctx.out_wheel = output_wheel
5859
ctx.zip_compression_level = zip_compression_level
5960

6061
match = WHEEL_INFO_RE(wheel_fname)
@@ -125,7 +126,7 @@ def repair_wheel(
125126
extensions = external_refs_by_fn.keys()
126127
strip_symbols(itertools.chain(libs_to_strip, extensions))
127128

128-
return ctx.out_wheel
129+
return output_wheel
129130

130131

131132
def strip_symbols(libraries: Iterable[Path]) -> None:

tests/integration/test_manylinux.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ def docker_start(
292292
environment=env_variables,
293293
platform=f"linux/{goarch}",
294294
)
295+
assert isinstance(con.id, str)
295296
logger.info("Started container %s", con.id[:12])
296297
return con
297298

@@ -332,6 +333,7 @@ def docker_exec(
332333
cwd: str | None = None,
333334
env: dict[str, str] | None = None,
334335
) -> str:
336+
assert isinstance(container.id, str)
335337
logger.info("docker exec %s: %r", container.id[:12], cmd)
336338
ec, output = container.exec_run(cmd, workdir=cwd, environment=env)
337339
output = output.decode("utf-8")

tests/unit/test_lddtree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_libpython_re_nomatch(soname: str) -> None:
3434
assert LIBPYTHON_RE.match(soname) is None
3535

3636

37-
def test_libpython(tmp_path: Path, caplog: pytest.CaptureFixture) -> None:
37+
def test_libpython(tmp_path: Path, caplog: pytest.LogCaptureFixture) -> None:
3838
wheel = (
3939
HERE
4040
/ ".."

0 commit comments

Comments
 (0)