Skip to content

Commit 2e4a81d

Browse files
committed
typing 3rd attempt
1 parent 5a9aa01 commit 2e4a81d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

xarray/coding/variables.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def encode(self, variable: Variable, name: T_Name = None) -> Variable:
279279
return Variable(dims, data, attrs, encoding, fastpath=True)
280280

281281
def decode(self, variable: Variable, name: T_Name = None) -> Variable:
282-
return NotImplementedError
282+
raise NotImplementedError()
283283

284284

285285
class CFScaleOffsetCoder(VariableCoder):
@@ -478,8 +478,8 @@ def __getitem__(self, key):
478478
class EndianCoder(VariableCoder):
479479
"""Decode Endianness to native."""
480480

481-
def encode(self):
482-
return NotImplementedError
481+
def encode(self, variable: Variable, name: T_Name = None) -> Variable:
482+
raise NotImplementedError()
483483

484484
def decode(self, variable: Variable, name: T_Name = None) -> Variable:
485485
dims, data, attrs, encoding = unpack_for_decoding(variable)
@@ -519,5 +519,5 @@ def encode(self, variable: Variable, name: T_Name = None) -> Variable:
519519
variable = Variable(dims, data, attrs, encoding, fastpath=True)
520520
return variable
521521

522-
def decode(self):
523-
return NotImplementedError
522+
def decode(self, variable: Variable, name: T_Name = None) -> Variable:
523+
raise NotImplementedError()

0 commit comments

Comments
 (0)