Skip to content

Commit

Permalink
Add type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Apr 20, 2024
1 parent 7a87e21 commit 9acab20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nautilus_trader/persistence/catalog/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def key(obj: Any) -> tuple[str, str | None]:
return name, obj.instrument_id.value
return name, None

def obj_to_type(obj) -> type:
def obj_to_type(obj: Data) -> type:
return type(obj) if not isinstance(obj, CustomData) else obj.data.__class__

name_to_cls = {cls.__name__: cls for cls in {obj_to_type(d) for d in data}}
Expand Down

0 comments on commit 9acab20

Please sign in to comment.