zulip_trello: Add type annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
40fba154c2
commit
a9e3fe9d0c
2 changed files with 4 additions and 8 deletions
|
@ -25,10 +25,6 @@ exclude = [
|
||||||
# Excluded out of laziness:
|
# Excluded out of laziness:
|
||||||
"zulip_bots/zulip_bots/simple_lib.py",
|
"zulip_bots/zulip_bots/simple_lib.py",
|
||||||
"zulip_bots/zulip_bots/tests/test_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",
|
"tools",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ except ImportError:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def get_model_id(options):
|
def get_model_id(options: argparse.Namespace) -> str:
|
||||||
"""get_model_id
|
"""get_model_id
|
||||||
|
|
||||||
Get Model Id from Trello API
|
Get Model Id from Trello API
|
||||||
|
@ -43,7 +43,7 @@ def get_model_id(options):
|
||||||
return board_info_json["id"]
|
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
|
||||||
|
|
||||||
Get webhook id from Trello API
|
Get webhook id from Trello API
|
||||||
|
@ -78,7 +78,7 @@ def get_webhook_id(options, id_model):
|
||||||
return webhook_info_json["id"]
|
return webhook_info_json["id"]
|
||||||
|
|
||||||
|
|
||||||
def create_webhook(options):
|
def create_webhook(options: argparse.Namespace) -> None:
|
||||||
"""create_webhook
|
"""create_webhook
|
||||||
|
|
||||||
Create Trello webhook
|
Create Trello webhook
|
||||||
|
@ -107,7 +107,7 @@ def create_webhook(options):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main() -> None:
|
||||||
description = """
|
description = """
|
||||||
zulip_trello.py is a handy little script that allows Zulip users to
|
zulip_trello.py is a handy little script that allows Zulip users to
|
||||||
quickly set up a Trello webhook.
|
quickly set up a Trello webhook.
|
||||||
|
|
Loading…
Add table
Reference in a new issue