File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11from numpy cimport int64_t
22
33
4- cpdef bint format_is_iso(str f)
54cdef bint parse_today_now(str val, int64_t* iresult, bint utc)
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ from pandas._libs.tslibs.timestamps import Timestamp
5454
5555cnp.import_array()
5656
57- cpdef bint format_is_iso(f: str ):
57+ cdef bint format_is_iso(f: str ):
5858 """
5959 Does format match the iso8601 set that can be handled by the C parser?
6060 Generally of form YYYY-MM-DDTHH:MM:SS - date separator can be different
@@ -74,6 +74,11 @@ cpdef bint format_is_iso(f: str):
7474 return False
7575
7676
77+ def _test_format_is_iso (f: str ) -> bool:
78+ """Only used in testing."""
79+ return format_is_iso(f )
80+
81+
7782cdef bint parse_today_now(str val , int64_t* iresult , bint utc ):
7883 # We delay this check for as long as possible
7984 # because it catches relatively rare cases
Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ def test_parse_time_string_check_instance_type_raise_exception():
315315)
316316def test_is_iso_format (fmt , expected ):
317317 # see gh-41047
318- result = strptime .format_is_iso (fmt )
318+ result = strptime ._test_format_is_iso (fmt )
319319 assert result == expected
320320
321321
You can’t perform that action at this time.
0 commit comments