Skip to content

Commit 9e7f24d

Browse files
committed
mypy: unsupported operand type(s) for | in py3.9
1 parent 30190e6 commit 9e7f24d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/aleph/sdk/client/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def watch_messages(
247247
@abstractmethod
248248
def get_estimated_price(
249249
self,
250-
content: ProgramContent | InstanceContent,
250+
content: Union[ProgramContent, InstanceContent],
251251
) -> Coroutine[Any, Any, PriceResponse]:
252252
"""
253253
Get Instance/Program content estimated price

src/aleph/sdk/client/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ async def watch_messages(
460460

461461
async def get_estimated_price(
462462
self,
463-
content: ProgramContent | InstanceContent,
463+
content: Union[ProgramContent, InstanceContent],
464464
) -> PriceResponse:
465465
item_content: str = json.dumps(
466466
content, separators=(",", ":"), default=extended_json_encoder

src/aleph/sdk/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def safe_getattr(obj, attr, default=None):
414414

415415

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

0 commit comments

Comments
 (0)