From fd74d56fbb15a0c444b5b0016131fcccbda7c64e Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 19 Jul 2021 15:05:49 +0100 Subject: [PATCH] TYP: clean for PY3.8 (TypedDict) --- pandas/_typing.py | 4 ---- pandas/io/formats/style_render.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pandas/_typing.py b/pandas/_typing.py index 6583a9f60ee15..ef9f38bbf5168 100644 --- a/pandas/_typing.py +++ b/pandas/_typing.py @@ -37,8 +37,6 @@ # and use a string literal forward reference to it in subsequent types # https://mypy.readthedocs.io/en/latest/common_issues.html#import-cycles if TYPE_CHECKING: - from typing import TypedDict - import numpy.typing as npt from pandas._libs import ( @@ -73,8 +71,6 @@ from pandas.tseries.offsets import DateOffset else: npt: Any = None - # typing.TypedDict does not exist until py38 - TypedDict = dict # array-like diff --git a/pandas/io/formats/style_render.py b/pandas/io/formats/style_render.py index e240c04f97ed1..c855caa3c3ee0 100644 --- a/pandas/io/formats/style_render.py +++ b/pandas/io/formats/style_render.py @@ -12,6 +12,7 @@ Optional, Sequence, Tuple, + TypedDict, Union, ) from uuid import uuid4 @@ -21,7 +22,6 @@ from pandas._config import get_option from pandas._libs import lib -from pandas._typing import TypedDict from pandas.compat._optional import import_optional_dependency from pandas.core.dtypes.generic import ABCSeries