Skip to content

Commit

Permalink
fix: docstrings in spond.send_message() are incorrect for optional pa…
Browse files Browse the repository at this point in the history
…rams. Also added corresponding type hints
  • Loading branch information
elliot-100 committed Jun 8, 2024
1 parent 1935de1 commit 9aec497
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions spond/spond.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ async def _continue_chat(self, chat_id: str, text: str):
return await r.json()

@_SpondBase.require_authentication
async def send_message(self, text: str, user=None, group_uid=None, chat_id=None):
async def send_message(
self,
text: str,
user: Optional[str] = None,
group_uid: Optional[str] = None,
chat_id: Optional[str] = None,
):
"""
Start a new chat or continue an existing one.
Expand All @@ -159,14 +165,14 @@ async def send_message(self, text: str, user=None, group_uid=None, chat_id=None)
Parameters
----------
text: str
text : str
Message to send
user : str
user : str, optional
Identifier to match against member/guardian's id, email, full name, or
profile id.
group_uid : str
group_uid : str, optional
UID of the group.
chat_id : str
chat_id : str, optional
Identifier of the chat.
Returns
Expand Down

0 comments on commit 9aec497

Please sign in to comment.