From 4515ccea859fff6eef75caca767d71ba8b740759 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 20:15:02 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.19.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.1...v1.19.1) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 23.9.1 → 25.12.0](https://github.com/psf/black-pre-commit-mirror/compare/23.9.1...25.12.0) - [github.com/PyCQA/isort: 5.12.0 → 7.0.0](https://github.com/PyCQA/isort/compare/5.12.0...7.0.0) - [github.com/PyCQA/flake8: 6.1.0 → 7.3.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.3.0) - [github.com/pre-commit/mirrors-clang-format: v16.0.6 → v21.1.8](https://github.com/pre-commit/mirrors-clang-format/compare/v16.0.6...v21.1.8) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b24026ed..6384338f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,27 +1,27 @@ repos: - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.5.1' + rev: 'v1.19.1' hooks: - id: mypy language: system pass_filenames: false args: ['legate_sparse'] - - repo: https://github.com/psf/black - rev: 23.9.1 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.12.0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 7.0.0 hooks: - id: isort args: ["--profile", "black"] - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.3.0 hooks: - id: flake8 args: [--config=.flake8] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: 'v16.0.6' # Use the sha / tag you want to point at + rev: 'v21.1.8' # Use the sha / tag you want to point at hooks: - id: clang-format files: \.(cu|cuh|h|cc|inl)$ From ac60270bdc1006ddb2c5738cb55d5c40e7859d99 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 20:15:11 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/common.py | 3 +-- examples/pde.py | 4 +++- legate_sparse/coverage.py | 3 +-- legate_sparse/module.py | 1 + scripts/memlog_analysis.py | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/common.py b/examples/common.py index 99174ed6..c7b7b493 100644 --- a/examples/common.py +++ b/examples/common.py @@ -171,8 +171,7 @@ class DummyScope: that may or may not use resource scoping. """ - def __init__(self): - ... + def __init__(self): ... def __enter__(self): """Enter the context (no-op).""" diff --git a/examples/pde.py b/examples/pde.py index d9ca0095..9212baba 100644 --- a/examples/pde.py +++ b/examples/pde.py @@ -218,7 +218,9 @@ def execute(nx, ny, plot, plot_fname, throughput, tol, max_iters, warmup_iters, # If we're testing throughput, run only the prescribed number of iterations. if throughput: if use_legate: - p_sol, iters = linalg.cg(A, bflat, rtol=tol, maxiter=max_iters, conv_test_iters=max_iters) + p_sol, iters = linalg.cg( + A, bflat, rtol=tol, maxiter=max_iters, conv_test_iters=max_iters + ) else: p_sol, iters = linalg.cg(A, bflat, rtol=tol, maxiter=max_iters) else: diff --git a/legate_sparse/coverage.py b/legate_sparse/coverage.py index 8765044e..cfbf98aa 100644 --- a/legate_sparse/coverage.py +++ b/legate_sparse/coverage.py @@ -43,8 +43,7 @@ def should_wrap(obj: object) -> bool: class AnyCallable(Protocol): - def __call__(self, *args: Any, **kwargs: Any) -> Any: - ... + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def wrap(func: AnyCallable) -> Any: diff --git a/legate_sparse/module.py b/legate_sparse/module.py index 56f22fa1..e2004a60 100644 --- a/legate_sparse/module.py +++ b/legate_sparse/module.py @@ -59,6 +59,7 @@ def _is_sparse_matrix(obj) -> bool: return any((isinstance(obj, csr_array), isinstance(obj, dia_array))) + def isspmatrix(obj) -> bool: """Check if an object is a legate sparse matrix. diff --git a/scripts/memlog_analysis.py b/scripts/memlog_analysis.py index ee8bd3c6..e294c349 100644 --- a/scripts/memlog_analysis.py +++ b/scripts/memlog_analysis.py @@ -16,10 +16,10 @@ # Parse the log file allocations = parse_memlog('memlog.txt') - + # Export to CSV export_to_csv(allocations, 'memory_analysis.csv') - + # Create visualizations (requires pandas, matplotlib, seaborn) visualize_allocations(allocations) """ # noqa: W293