Skip to content

Commit 6ddd9dc

Browse files
committed
use fresh abcs
1 parent 036cce8 commit 6ddd9dc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

numcodecs/abc.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
"""
3030

3131
from abc import ABC, abstractmethod
32-
from typing import ClassVar
32+
from typing import Optional
3333

3434

3535
class Codec(ABC):
3636
"""Codec abstract base class."""
3737

3838
# override in sub-class
39-
codec_id: ClassVar[str]
39+
codec_id: Optional[str] = None
4040
"""Codec identifier."""
4141

4242
@abstractmethod
@@ -106,14 +106,14 @@ def from_config(cls, config):
106106
# keyword arguments without any special decoding
107107
return cls(**config)
108108

109-
def __eq__(self, other: object) -> bool:
109+
def __eq__(self, other):
110110
# override in sub-class if need special equality comparison
111111
try:
112-
return self.get_config() == other.get_config() # type: ignore[attr-defined]
112+
return self.get_config() == other.get_config()
113113
except AttributeError:
114114
return False
115115

116-
def __repr__(self) -> str:
116+
def __repr__(self):
117117
# override in sub-class if need special representation
118118

119119
# by default, assume all non-private members are configuration

0 commit comments

Comments
 (0)