From a9043f4d375df75e6a3ccc574ea07712603a0f4d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:37:29 +0900 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#38) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.3.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.9...v0.3.5) - [github.com/psf/black: 23.12.1 → 24.3.0](https://github.com/psf/black/compare/23.12.1...24.3.0) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.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> --- .pre-commit-config.yaml | 6 +++--- compress_wheel.py | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0fcdf20..2dc37c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,19 +13,19 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.9" + rev: "v0.3.5" hooks: - id: ruff args: [--fix] - repo: https://github.com/psf/black - rev: "23.12.1" + rev: "24.3.0" hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.8.0" + rev: "v1.9.0" hooks: - id: mypy exclude: examples diff --git a/compress_wheel.py b/compress_wheel.py index c052445..5f6463e 100644 --- a/compress_wheel.py +++ b/compress_wheel.py @@ -11,9 +11,12 @@ def main(): fd_to_keep = [el for el in fd_to_keep if el.startswith(site_packages_prefix)] fd_to_keep = [el.replace(site_packages_prefix, "") for el in fd_to_keep] - with zipfile.ZipFile( - WHEELS_DIR / "numpy-1.22.3-cp310-cp310-emscripten_wasm32.whl", "r" - ) as zin, zipfile.ZipFile("/tmp/out.whl", "w") as zout: + with ( + zipfile.ZipFile( + WHEELS_DIR / "numpy-1.22.3-cp310-cp310-emscripten_wasm32.whl", "r" + ) as zin, + zipfile.ZipFile("/tmp/out.whl", "w") as zout, + ): for item in zin.infolist(): buff = zin.read(item.filename) keep = False