python: Use Python 3.8 typing.{Protocol,TypedDict}.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-04-26 17:23:56 -07:00
committed by Tim Abbott
parent 098a514599
commit a2825e5984
26 changed files with 53 additions and 46 deletions

View File

@@ -14,7 +14,7 @@ import shutil
import subprocess
import tempfile
from functools import lru_cache
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, TypedDict
import orjson
from django.apps import apps
@@ -24,7 +24,6 @@ from django.forms.models import model_to_dict
from django.utils.timezone import is_naive as timezone_is_naive
from django.utils.timezone import make_aware as timezone_make_aware
from mypy_boto3_s3.service_resource import Object
from typing_extensions import TypedDict
import zerver.lib.upload
from analytics.models import RealmCount, StreamCount, UserCount