Skip to content

Commit c9ff68f

Browse files
committed
pandas-dev#26020 Fixed type annotations for pandas.plotting._core
1 parent a1fee91 commit c9ff68f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

mypy.ini

-3
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ ignore_errors=True
167167
[mypy-pandas.io.stata]
168168
ignore_errors=True
169169

170-
[mypy-pandas.plotting._core]
171-
ignore_errors=True
172-
173170
[mypy-pandas.tseries.frequencies]
174171
ignore_errors=True
175172

pandas/plotting/_core.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# pylint: disable=E1101
33
from collections import namedtuple
44
import re
5+
from typing import List, Optional, Type
56
import warnings
67

78
import numpy as np
@@ -78,7 +79,7 @@ def _kind(self):
7879

7980
_layout_type = 'vertical'
8081
_default_rot = 0
81-
orientation = None
82+
orientation = None # type: Optional[str]
8283
_pop_attributes = ['label', 'style', 'logy', 'logx', 'loglog',
8384
'mark_right', 'stacked']
8485
_attr_defaults = {'logy': False, 'logx': False, 'loglog': False,
@@ -1723,7 +1724,8 @@ def result(self):
17231724
_all_kinds = _common_kinds + _dataframe_kinds + _series_kinds
17241725

17251726
_klasses = [LinePlot, BarPlot, BarhPlot, KdePlot, HistPlot, BoxPlot,
1726-
ScatterPlot, HexBinPlot, AreaPlot, PiePlot]
1727+
ScatterPlot, HexBinPlot, AreaPlot, PiePlot] \
1728+
# type: List[Type[MPLPlot]]
17271729

17281730
_plot_klass = {klass._kind: klass for klass in _klasses}
17291731

0 commit comments

Comments
 (0)