File tree 1 file changed +7
-5
lines changed
pandas/plotting/_matplotlib 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
# TODO: Use the fact that axis can have units to simplify the process
2
2
3
3
import functools
4
- from typing import Optional
4
+ from typing import TYPE_CHECKING , Optional
5
5
6
6
import numpy as np
7
7
24
24
from pandas .tseries .frequencies import is_subperiod , is_superperiod
25
25
from pandas .tseries .offsets import DateOffset
26
26
27
+ if TYPE_CHECKING :
28
+ from pandas ._typing import FrameOrSeries # noqa: F401
29
+
30
+
27
31
# ---------------------------------------------------------------------
28
32
# Plotting functions and monkey patches
29
33
@@ -188,7 +192,8 @@ def _get_freq(ax, series):
188
192
return freq , ax_freq
189
193
190
194
191
- def _use_dynamic_x (ax , data ):
195
+ def _use_dynamic_x (ax , data : "FrameOrSeries" ) -> bool :
196
+
192
197
freq = _get_index_freq (data )
193
198
ax_freq = _get_ax_freq (ax )
194
199
@@ -203,9 +208,6 @@ def _use_dynamic_x(ax, data):
203
208
204
209
freq = get_period_alias (freq )
205
210
206
- if freq is None :
207
- return False
208
-
209
211
# FIXME: hack this for 0.10.1, creating more technical debt...sigh
210
212
if isinstance (data .index , ABCDatetimeIndex ):
211
213
base = get_freq_code (freq )[0 ]
You can’t perform that action at this time.
0 commit comments