Skip to content

Commit 721d5d4

Browse files
Apply and enforce ruff/isort rules (I)
1 parent abc2ccf commit 721d5d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+100
-178
lines changed

adhoc/blosc_memleak_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import sys
22

3-
import numcodecs
43
import numpy as np
54
from numpy.testing import assert_array_equal
65

6+
import numcodecs
77

88
codec = numcodecs.Blosc()
99
data = np.arange(int(sys.argv[1]))

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
# serve to show the default.
1414

1515

16-
import sys
1716
import os
17+
import sys
1818
from unittest.mock import Mock as MagicMock
19+
1920
import numcodecs
2021

2122

numcodecs/astype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33
from .abc import Codec
4-
from .compat import ndarray_copy, ensure_ndarray
4+
from .compat import ensure_ndarray, ndarray_copy
55

66

77
class AsType(Codec):

numcodecs/bitround.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import numpy as np
22

3-
43
from .abc import Codec
54
from .compat import ensure_ndarray_like, ndarray_copy
65

numcodecs/bz2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import bz2 as _bz2
22

3-
43
from numcodecs.abc import Codec
5-
from numcodecs.compat import ndarray_copy, ensure_contiguous_ndarray
4+
from numcodecs.compat import ensure_contiguous_ndarray, ndarray_copy
65

76

87
class BZ2(Codec):

numcodecs/categorize.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
from .abc import Codec
2-
from .compat import ensure_ndarray, ndarray_copy, ensure_text
3-
4-
51
import numpy as np
62

3+
from .abc import Codec
4+
from .compat import ensure_ndarray, ensure_text, ndarray_copy
5+
76

87
class Categorize(Codec):
98
"""Filter encoding categorical string data as integers.

numcodecs/checksum32.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1+
import struct
12
import zlib
23

3-
44
import numpy as np
5-
import struct
6-
75

86
from .abc import Codec
97
from .compat import ensure_contiguous_ndarray, ndarray_copy

numcodecs/delta.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import numpy as np
22

3-
43
from .abc import Codec
54
from .compat import ensure_ndarray, ndarray_copy
65

numcodecs/fixedscaleoffset.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import numpy as np
22

3-
43
from .abc import Codec
54
from .compat import ensure_ndarray, ndarray_copy
65

numcodecs/json.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import json as _json
22
import textwrap
33

4-
54
import numpy as np
65

7-
86
from .abc import Codec
97
from .compat import ensure_text
108

0 commit comments

Comments
 (0)