Skip to content

Commit

Permalink
Merge pull request #52 from laurimi/fix-type-hints-for-3.9
Browse files Browse the repository at this point in the history
Fix: python 3.9 does not support | syntax for union
  • Loading branch information
filipre authored May 4, 2024
2 parents 12b2878 + 9da8b5f commit 4038975
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions signalbot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ async def _produce(self, name: int) -> None:
def _should_react_for_contact(
self,
message: Message,
contacts: list[str] | bool,
group_ids: list[str] | bool,
contacts: Union[list[str], bool],
group_ids: Union[list[str], bool],
):
"""Is the command activated for a certain chat or group?"""

Expand Down Expand Up @@ -379,7 +379,7 @@ def _should_react_for_contact(
def _should_react_for_lambda(
self,
message: Message,
f: Callable[[Message], bool] | None,
f: Optional[Callable[[Message], bool]] = None,
) -> bool:
if f is None:
return True
Expand Down

0 comments on commit 4038975

Please sign in to comment.