Skip to content

Commit 5c497c3

Browse files
Apply suggestions from code review
Co-authored-by: Illviljan <[email protected]>
1 parent 7afb8c7 commit 5c497c3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

xarray/coding/variables.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ class NativeEndiannessArray(indexing.ExplicitlyIndexedNDArrayMixin):
100100

101101
__slots__ = ("array",)
102102

103-
def __init__(self, array):
103+
def __init__(self, array) -> None:
104104
self.array = indexing.as_indexable(array)
105105

106106
@property
107-
def dtype(self):
107+
def dtype(self) -> np.dtype:
108108
return np.dtype(self.array.dtype.kind + str(self.array.dtype.itemsize))
109109

110-
def __getitem__(self, key):
110+
def __getitem__(self, key) -> np.ndarray:
111111
return np.asarray(self.array[key], dtype=self.dtype)
112112

113113

@@ -132,14 +132,14 @@ class BoolTypeArray(indexing.ExplicitlyIndexedNDArrayMixin):
132132

133133
__slots__ = ("array",)
134134

135-
def __init__(self, array):
135+
def __init__(self, array) -> None:
136136
self.array = indexing.as_indexable(array)
137137

138138
@property
139-
def dtype(self):
139+
def dtype(self) -> np.dtype:
140140
return np.dtype("bool")
141141

142-
def __getitem__(self, key):
142+
def __getitem__(self, key) -> np.ndarray:
143143
return np.asarray(self.array[key], dtype=self.dtype)
144144

145145

0 commit comments

Comments
 (0)