Skip to content

Commit

Permalink
mypy: unsupported operand type(s) for | in py3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
philogicae committed Feb 6, 2025
1 parent 30190e6 commit 9e7f24d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/aleph/sdk/client/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def watch_messages(
@abstractmethod
def get_estimated_price(
self,
content: ProgramContent | InstanceContent,
content: Union[ProgramContent, InstanceContent],
) -> Coroutine[Any, Any, PriceResponse]:
"""
Get Instance/Program content estimated price
Expand Down
2 changes: 1 addition & 1 deletion src/aleph/sdk/client/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ async def watch_messages(

async def get_estimated_price(
self,
content: ProgramContent | InstanceContent,
content: Union[ProgramContent, InstanceContent],
) -> PriceResponse:
item_content: str = json.dumps(
content, separators=(",", ":"), default=extended_json_encoder
Expand Down
2 changes: 1 addition & 1 deletion src/aleph/sdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def safe_getattr(obj, attr, default=None):


def displayable_amount(
amount: str | int | float | Decimal, decimals: Optional[int] = None
amount: Union[str, int, float, Decimal], decimals: Optional[int] = None
) -> str:
"""Returns the amount as a string without unnecessary decimals."""

Expand Down

0 comments on commit 9e7f24d

Please sign in to comment.