Skip to content

Commit

Permalink
Do not import TypedDict from mypy-extensions, use `typing-extensi…
Browse files Browse the repository at this point in the history
…ons` (#15494)

All recent versions (declared in `setup.py`) have `TypedDict` there. So,
no need to use `mypy-extensions` here.

(crossref: found while working on
typeddjango/django-stubs#1566)
  • Loading branch information
sobolevn committed Jun 22, 2023
1 parent aba35af commit a5e316e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
Sequence,
TextIO,
)
from typing_extensions import Final, TypeAlias as _TypeAlias

from mypy_extensions import TypedDict
from typing_extensions import Final, TypeAlias as _TypeAlias, TypedDict

import mypy.semanal_main
from mypy.checker import TypeChecker
Expand Down Expand Up @@ -343,7 +341,9 @@ class CacheMeta(NamedTuple):


# Metadata for the fine-grained dependencies file associated with a module.
FgDepMeta = TypedDict("FgDepMeta", {"path": str, "mtime": int})
class FgDepMeta(TypedDict):
path: str
mtime: int


def cache_meta_from_dict(meta: dict[str, Any], data_json: str) -> CacheMeta:
Expand Down

0 comments on commit a5e316e

Please sign in to comment.