File tree Expand file tree Collapse file tree 1 file changed +7
-21
lines changed
src/service/payloads/service Expand file tree Collapse file tree 1 file changed +7
-21
lines changed Original file line number Diff line number Diff line change 11from src .service .payloads .values .data_type import DataType
2+ from dataclasses import dataclass
23
3-
4+ @ dataclass
45class SchemaItem :
5- def __init__ (self , type : DataType , name : str , column_index : int ) -> None :
6- self .type : DataType = type
7- self .name : str = name
8- self .column_index : int = column_index
6+ type : DataType
7+ name : str
8+ column_index : int
99
10+ # Keeping these methods for backward compatibility
1011 def get_type (self ) -> DataType :
1112 return self .type
1213
@@ -23,19 +24,4 @@ def get_column_index(self) -> int:
2324 return self .column_index
2425
2526 def set_column_index (self , column_index : int ) -> None :
26- self .column_index = column_index
27-
28- def __eq__ (self , other : object ) -> bool :
29- if not isinstance (other , SchemaItem ):
30- return False
31- return (
32- self .type == other .type
33- and self .name == other .name
34- and self .column_index == other .column_index
35- )
36-
37- def __hash__ (self ) -> int :
38- return hash ((self .type , self .name , self .column_index ))
39-
40- def __str__ (self ) -> str :
41- return f"SchemaItem(type={ self .type } , name='{ self .name } ', column_index={ self .column_index } )"
27+ self .column_index = column_index
You can’t perform that action at this time.
0 commit comments