Skip to content

Commit

Permalink
Fix broken Python 3.9 implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyGuthridge committed Jan 11, 2024
1 parent 43fd727 commit 30800e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flapi/__util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Helper functions
"""
from typing import Any
from typing import Any, Union


def bytes_to_str(msg: bytes) -> str:
Expand All @@ -13,7 +13,7 @@ def bytes_to_str(msg: bytes) -> str:
return f"{repr([hex(i) for i in msg])} ({repr(msg)})"


def try_eval(source: str | bytes) -> Any:
def try_eval(source: Union[str, bytes]) -> Any:
"""
Evaluate the given source code, but raise a sane exception if it fails
"""
Expand Down

0 comments on commit 30800e4

Please sign in to comment.