Skip to content

Commit 2326784

Browse files
committed
remove comments __hash__
1 parent 86155aa commit 2326784

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

eventsourcingdb/read_event_types/event_type.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ def parse(unknown_object: dict) -> "EventType":
3232
schema=schema,
3333
)
3434

35-
def __hash__(self) -> int: # Changed from str to int
36-
# Convert dictionary schema to a hashable form (tuple of items)
35+
def __hash__(self) -> int:
3736
if isinstance(self.schema, dict):
38-
# Sort items to ensure consistent hashing
3937
schema_items = tuple(sorted((k, str(v)) for k, v in self.schema.items()))
40-
return hash((self.event_type, self.is_phantom, schema_items)) # Remove str() conversion
41-
return hash((self.event_type, self.is_phantom, self.schema)) # Remove str() conversion
38+
return hash((self.event_type, self.is_phantom, schema_items))
39+
return hash((self.event_type, self.is_phantom, self.schema))

0 commit comments

Comments
 (0)