Skip to content

Commit 0e95f8b

Browse files
[pre-commit.ci] pre-commit autoupdate (#714)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](astral-sh/ruff-pre-commit@v0.4.10...v0.5.0) * Fix linting warning. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Hameer Abbasi <[email protected]>
1 parent a73b20d commit 0e95f8b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
exclude: ".ipynb"
1919

2020
- repo: https://github.com/astral-sh/ruff-pre-commit
21-
rev: v0.4.10
21+
rev: v0.5.0
2222
hooks:
2323
- id: ruff
2424
args: ["--fix"]

sparse/numba_backend/_common.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ def _is_scipy_sparse_obj(x):
2424
"""
2525
Tests if the supplied argument is a SciPy sparse object.
2626
"""
27-
if hasattr(x, "__module__") and x.__module__.startswith("scipy.sparse"):
28-
return True
29-
return False
27+
return bool(hasattr(x, "__module__") and x.__module__.startswith("scipy.sparse"))
3028

3129

3230
def _check_device(func):

0 commit comments

Comments
 (0)