Skip to content

Commit

Permalink
fix type hints for Python < 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
bfontaine committed Sep 4, 2024
1 parent 2ecc955 commit e872b49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions magento/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def get_orders_items(self, *, sku: Optional[str] = None, query: Query = None, li

return self.get_paginated("/V1/orders/items", query=query, limit=limit, **kwargs)

def get_order(self, order_id: str | int, *,
def get_order(self, order_id: Union[str, int], *,
none_on_404=False,
none_on_empty=False,
**kwargs) -> Order:
Expand All @@ -628,15 +628,15 @@ def get_order_by_increment_id(self, increment_id: str, **kwargs) -> Optional[Ord
return order
return None

def hold_order(self, order_id: str | int, **kwargs):
def hold_order(self, order_id: Union[str, int], **kwargs):
"""
Hold an order. This is the opposite of ``unhold_order``.
:param order_id: order id (not increment id)
"""
return self.post_json_api(f"/V1/orders/{escape_path(order_id)}/hold", **kwargs)

def unhold_order(self, order_id: str | int, **kwargs):
def unhold_order(self, order_id: Union[str, int], **kwargs):
"""
Un-hold an order. This is the opposite of ``hold_order``.
Expand Down

0 comments on commit e872b49

Please sign in to comment.