zulip_trello: Add type annotations.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-10-25 16:21:34 -07:00
parent 40fba154c2
commit a9e3fe9d0c
2 changed files with 4 additions and 8 deletions

View file

@ -25,10 +25,6 @@ exclude = [
# Excluded out of laziness:
"zulip_bots/zulip_bots/simple_lib.py",
"zulip_bots/zulip_bots/tests/test_lib.py",
# Excluded because this is a self-contained script
# we ask our users to download and run directly and
# py2 and py3 compatibility is required.
"zulip/integrations/trello/zulip_trello.py",
"tools",
]

View file

@ -14,7 +14,7 @@ except ImportError:
sys.exit(1)
def get_model_id(options):
def get_model_id(options: argparse.Namespace) -> str:
"""get_model_id
Get Model Id from Trello API
@ -43,7 +43,7 @@ def get_model_id(options):
return board_info_json["id"]
def get_webhook_id(options, id_model):
def get_webhook_id(options: argparse.Namespace, id_model: str) -> str:
"""get_webhook_id
Get webhook id from Trello API
@ -78,7 +78,7 @@ def get_webhook_id(options, id_model):
return webhook_info_json["id"]
def create_webhook(options):
def create_webhook(options: argparse.Namespace) -> None:
"""create_webhook
Create Trello webhook
@ -107,7 +107,7 @@ def create_webhook(options):
)
def main():
def main() -> None:
description = """
zulip_trello.py is a handy little script that allows Zulip users to
quickly set up a Trello webhook.