Skip to content

Commit 28ff1e8

Browse files
TYP: clean for PY3.8 (TypedDict) (#42607)
1 parent b72b6b2 commit 28ff1e8

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

pandas/_typing.py

-4
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
# and use a string literal forward reference to it in subsequent types
3838
# https://mypy.readthedocs.io/en/latest/common_issues.html#import-cycles
3939
if TYPE_CHECKING:
40-
from typing import TypedDict
41-
4240
import numpy.typing as npt
4341

4442
from pandas._libs import (
@@ -73,8 +71,6 @@
7371
from pandas.tseries.offsets import DateOffset
7472
else:
7573
npt: Any = None
76-
# typing.TypedDict does not exist until py38
77-
TypedDict = dict
7874

7975

8076
# array-like

pandas/io/formats/style_render.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Optional,
1313
Sequence,
1414
Tuple,
15+
TypedDict,
1516
Union,
1617
)
1718
from uuid import uuid4
@@ -21,7 +22,6 @@
2122
from pandas._config import get_option
2223

2324
from pandas._libs import lib
24-
from pandas._typing import TypedDict
2525
from pandas.compat._optional import import_optional_dependency
2626

2727
from pandas.core.dtypes.generic import ABCSeries

0 commit comments

Comments
 (0)