Skip to content

Commit 9605aa1

Browse files
author
Matt Roeschke
committed
cleanup
1 parent 3232c26 commit 9605aa1

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

pandas/core/indexes/datetimes.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,10 @@ def _generate_range(cls, start, end, periods, name=None, freq=None,
385385

386386
@classmethod
387387
def _use_cached_range(cls, freq, _normalized, start, end):
388-
return _use_cached_range(freq, _normalized, start, end)
388+
# Note: This always returns False
389+
return (freq._should_cache() and
390+
not (freq._normalize_cache and not _normalized) and
391+
_naive_in_cache_range(start, end))
389392

390393
def _convert_for_op(self, value):
391394
""" Convert value to be insertable to ndarray """
@@ -1861,17 +1864,7 @@ def _naive_in_cache_range(start, end):
18611864
else:
18621865
if start.tzinfo is not None or end.tzinfo is not None:
18631866
return False
1864-
return _in_range(start, end, _CACHE_START, _CACHE_END)
1865-
1866-
1867-
def _in_range(start, end, rng_start, rng_end):
1868-
return start > rng_start and end < rng_end
1869-
1870-
1871-
def _use_cached_range(freq, _normalized, start, end):
1872-
return (freq._should_cache() and
1873-
not (freq._normalize_cache and not _normalized) and
1874-
_naive_in_cache_range(start, end))
1867+
return start > _CACHE_START and end < _CACHE_END
18751868

18761869

18771870
def _time_to_micros(time):

0 commit comments

Comments
 (0)