Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tail-ses: Add IdentityArgsDict.
Zixuan James Li3404282927d4
diff --git a/tools/tail-ses b/tools/tail-sesindex abf0f98e5ff..4e0ced136a0 100755--- a/tools/tail-ses+++ b/tools/tail-ses@@ -11,7 +11,7 @@ os.environ["DJANGO_SETTINGS_MODULE"] = "zproject.settings"import argparseimport secretsfrom contextlib import contextmanager-from typing import Iterator, List, Tuple+from typing import Iterator, List, Tuple, TypedDictimport boto3import orjson@@ -22,6 +22,11 @@ from mypy_boto3_sqs import SQSClientfrom mypy_boto3_sqs.type_defs import DeleteMessageBatchRequestEntryTypeDef+class IdentityArgsDict(TypedDict, total=False):+ default: str+ required: bool++def main() -> None:session = boto3.Session()@@ -35,7 +40,7 @@ def main() -> None:for identity_resp in identity_paginator.paginate():possible_identities += identity_resp["Identities"]- identity_args = {}+ identity_args: IdentityArgsDict = {}if from_host in possible_identities:identity_args["default"] = from_hostelif from_address in possible_identities: