Skip to content

Commit

Permalink
backward compat union typing for python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Oct 12, 2024
1 parent de57690 commit 63bab54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cowbird/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def bool2str(value: Any) -> str:
return "true" if str(value).lower() in truthy else "false"


def bytes2str(string: str | bytes) -> str:
def bytes2str(string: Union[str, bytes]) -> str:
"""
Ensures a string is represented in UTF-8.
"""
Expand Down

0 comments on commit 63bab54

Please sign in to comment.