Skip to content

Commit 974e08e

Browse files
updated comments
1 parent d0730ac commit 974e08e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/indexes/datetimes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,9 +720,6 @@ def slice_indexer(self, start=None, end=None, step=None):
720720
def check_str_or_none(point) -> bool:
721721
return point is not None and not isinstance(point, str)
722722

723-
# GH#33146 if start and end are combinations of str and None and Index is not
724-
# monotonic, we can not use Index.slice_indexer because it does not honor the
725-
# actual elements, is only searching for start and end
726723
# GH#58302 - Deprecate non-ISO string formats in .loc indexing
727724
if isinstance(start, str) and not _is_iso_format_string(start):
728725
msg = (
@@ -740,6 +737,9 @@ def check_str_or_none(point) -> bool:
740737
)
741738
warnings.warn(msg, Pandas4Warning, stacklevel=find_stack_level())
742739

740+
# GH#33146 if start and end are combinations of str and None and Index is not
741+
# monotonic, we can not use Index.slice_indexer because it does not honor the
742+
# actual elements, is only searching for start and end
743743
if (
744744
check_str_or_none(start)
745745
or check_str_or_none(end)

0 commit comments

Comments
 (0)