Skip to content

Commit 85d10bb

Browse files
simonjayhawkinsTomAugspurger
authored andcommitted
TYP: check_untyped_defs plotting._matplotlib.timeseries (#30662)
1 parent 94cbc2f commit 85d10bb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pandas/plotting/_matplotlib/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import TYPE_CHECKING, Dict, Type
2+
13
from pandas.plotting._matplotlib.boxplot import (
24
BoxPlot,
35
boxplot,
@@ -26,7 +28,10 @@
2628
)
2729
from pandas.plotting._matplotlib.tools import table
2830

29-
PLOT_CLASSES = {
31+
if TYPE_CHECKING:
32+
from pandas.plotting._matplotlib.core import MPLPlot # noqa: F401
33+
34+
PLOT_CLASSES: Dict[str, Type["MPLPlot"]] = {
3035
"line": LinePlot,
3136
"bar": BarPlot,
3237
"barh": BarhPlot,

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,6 @@ check_untyped_defs=False
331331
[mypy-pandas.plotting._matplotlib.misc]
332332
check_untyped_defs=False
333333

334-
[mypy-pandas.plotting._matplotlib.timeseries]
335-
check_untyped_defs=False
336-
337334
[mypy-pandas.tseries.holiday]
338335
check_untyped_defs=False
339336

0 commit comments

Comments
 (0)