File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2929"""
3030
3131from abc import ABC , abstractmethod
32- from typing import ClassVar
32+ from typing import Optional
3333
3434
3535class 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
You can’t perform that action at this time.
0 commit comments