Skip to content

Commit a6915e6

Browse files
committed
pre-commit autoupdate
1 parent 80abc1c commit a6915e6

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

Diff for: .pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
3+
rev: v5.0.0
44
hooks:
55
- id: check-yaml
66
- id: end-of-file-fixer
@@ -17,7 +17,7 @@ repos:
1717
args: ["--autofix", "--no-ensure-ascii"]
1818

1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.4.4
20+
rev: v0.9.1
2121
hooks:
2222
- id: ruff
2323
args: ["--fix"]

Diff for: docs/gen_logo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import xml.etree.ElementTree as et
1+
import xml.etree.ElementTree as et # noqa: ICN001
22

33
import numpy as np
44

@@ -31,7 +31,7 @@ def fill(rs):
3131
kwargs = {"x": "0", "y": "0", "width": f"{s}", "height": f"{s}", "stroke": "white"}
3232

3333
# large white squares for background
34-
bg_kwargs = {**kwargs, "width": f"{5*s}", "height": f"{5*s}", "style": "fill:white;"}
34+
bg_kwargs = {**kwargs, "width": f"{5 * s}", "height": f"{5 * s}", "style": "fill:white;"}
3535

3636

3737
root = et.Element(

Diff for: sparse/_io.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ def save_npz(filename, matrix, compressed=True):
5555
"fill_value": matrix.fill_value,
5656
}
5757

58-
if type(matrix) == COO:
58+
if type(matrix) is COO:
5959
nodes["coords"] = matrix.coords
60-
elif type(matrix) == GCXS:
60+
elif type(matrix) is GCXS:
6161
nodes["indices"] = matrix.indices
6262
nodes["indptr"] = matrix.indptr
6363
nodes["compressed_axes"] = matrix.compressed_axes

Diff for: sparse/_utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,7 @@ def check_zero_fill_value(*args):
584584
for i, arg in enumerate(args):
585585
if hasattr(arg, "fill_value") and not equivalent(arg.fill_value, _zero_of_dtype(arg.dtype)):
586586
raise ValueError(
587-
"This operation requires zero fill values, "
588-
f"but argument {i:d} had a fill value of {arg.fill_value!s}."
587+
f"This operation requires zero fill values, but argument {i:d} had a fill value of {arg.fill_value!s}."
589588
)
590589

591590

Diff for: sparse/tests/test_compressed_2d.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def test_transpose(random_sparse, copy):
109109
assert random_sparse.shape == t.shape[::-1]
110110

111111
assert_eq(random_sparse, tt)
112-
assert type(random_sparse) == type(tt)
112+
assert type(random_sparse) is type(tt)
113113

114114

115115
def test_transpose_error(random_sparse):

0 commit comments

Comments
 (0)