Skip to content

Commit bbc6cab

Browse files
committed
update typing of models
1 parent 4589e84 commit bbc6cab

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/three_commas/model/generated_models.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class BotEntity(ThreeCommasModel):
8484
max_active_deals: int
8585
active_deals_count: int
8686
deletable: bool
87-
created_at: Union[str, datetime]
88-
updated_at: Union[str, datetime]
87+
created_at: Union[str, datetime.datetime]
88+
updated_at: Union[str, datetime.datetime]
8989
trailing_enabled: bool
9090
tsl_enabled: bool
9191
deal_start_delay_seconds: int
@@ -170,8 +170,8 @@ class AccountEntity(ThreeCommasModel):
170170
bots_tsl_allowed: bool
171171
gordon_bots_available: bool
172172
multi_bots_allowed: bool
173-
created_at: Union[str, datetime]
174-
updated_at: Union[str, datetime]
173+
created_at: Union[str, datetime.datetime]
174+
updated_at: Union[str, datetime.datetime]
175175
last_auto_balance: str
176176
fast_convert_available: bool
177177
grid_bots_allowed: bool
@@ -290,9 +290,9 @@ class DealEntity(ThreeCommasModel):
290290
to_currency_id: int
291291
account_id: int
292292
active_safety_orders_count: int
293-
created_at: Union[str, datetime]
294-
updated_at: Union[str, datetime]
295-
closed_at: Union[str, datetime]
293+
created_at: Union[str, datetime.datetime]
294+
updated_at: Union[str, datetime.datetime]
295+
closed_at: Union[str, datetime.datetime]
296296
finished: bool
297297
current_active_safety_orders_count: int
298298
current_active_safety_orders: int

type_generators/auto_api_from_swaggerdoc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ def get_str_repr_for_type(parsed_type: type):
133133
return parsed_type.__name__
134134
if isinstance(parsed_type, str):
135135
return parsed_type
136+
if parsed_type is datetime.datetime:
137+
return 'datetime.datetime'
136138

137139
return parsed_type.__name__
138140

0 commit comments

Comments
 (0)