Skip to content

Commit

Permalink
#26020 Fixed type annotations for pandas.plotting._core (#26021)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwrome authored and WillAyd committed Apr 8, 2019
1 parent 6de8133 commit 0610a60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 0 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ ignore_errors=True
[mypy-pandas.io.stata]
ignore_errors=True

[mypy-pandas.plotting._core]
ignore_errors=True

[mypy-pandas.util._doctools]
ignore_errors=True

Expand Down
6 changes: 4 additions & 2 deletions pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# pylint: disable=E1101
from collections import namedtuple
import re
from typing import List, Optional, Type
import warnings

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

_layout_type = 'vertical'
_default_rot = 0
orientation = None
orientation = None # type: Optional[str]
_pop_attributes = ['label', 'style', 'logy', 'logx', 'loglog',
'mark_right', 'stacked']
_attr_defaults = {'logy': False, 'logx': False, 'loglog': False,
Expand Down Expand Up @@ -1723,7 +1724,8 @@ def result(self):
_all_kinds = _common_kinds + _dataframe_kinds + _series_kinds

_klasses = [LinePlot, BarPlot, BarhPlot, KdePlot, HistPlot, BoxPlot,
ScatterPlot, HexBinPlot, AreaPlot, PiePlot]
ScatterPlot, HexBinPlot, AreaPlot, PiePlot] \
# type: List[Type[MPLPlot]]

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

Expand Down

0 comments on commit 0610a60

Please sign in to comment.