Skip to content

Commit 946427c

Browse files
CI: isort fixup on 1.1.x (#37004)
1 parent ddb83e4 commit 946427c

15 files changed

+30
-22
lines changed

pandas/_libs/hashtable.pxd

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
from pandas._libs.khash cimport (
2-
kh_int64_t, kh_uint64_t, kh_float64_t, kh_pymap_t, kh_str_t, uint64_t,
3-
int64_t, float64_t)
41
from numpy cimport ndarray
52

3+
from pandas._libs.khash cimport (
4+
float64_t,
5+
int64_t,
6+
kh_float64_t,
7+
kh_int64_t,
8+
kh_pymap_t,
9+
kh_str_t,
10+
kh_uint64_t,
11+
uint64_t,
12+
)
13+
614
# prototypes for sharing
715

816
cdef class HashTable:

pandas/_libs/khash.pxd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from cpython.object cimport PyObject
2-
from numpy cimport int64_t, uint64_t, int32_t, uint32_t, float64_t
2+
from numpy cimport float64_t, int32_t, int64_t, uint32_t, uint64_t
3+
34

45
cdef extern from "khash_python.h":
56
ctypedef uint32_t khint_t

pandas/_libs/missing.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from numpy cimport ndarray, uint8_t
22

3+
34
cpdef bint checknull(object val)
45
cpdef bint checknull_old(object val)
56
cpdef ndarray[uint8_t] isnaobj(ndarray arr)

pandas/_libs/tslibs/ccalendar.pxd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from cython cimport Py_ssize_t
2-
3-
from numpy cimport int64_t, int32_t
2+
from numpy cimport int32_t, int64_t
43

54
ctypedef (int32_t, int32_t, int32_t) iso_calendar_t
65

pandas/_libs/tslibs/conversion.pxd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from cpython.datetime cimport datetime, tzinfo
2-
3-
from numpy cimport int64_t, int32_t, ndarray
2+
from numpy cimport int32_t, int64_t, ndarray
43

54
from pandas._libs.tslibs.np_datetime cimport npy_datetimestruct
65

pandas/_libs/tslibs/nattype.pxd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from cpython.datetime cimport datetime
2-
32
from numpy cimport int64_t
3+
4+
45
cdef int64_t NPY_NAT
56

67
cdef bint _nat_scalar_rules[6]

pandas/_libs/tslibs/np_datetime.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from cpython.datetime cimport date, datetime
2+
from numpy cimport int32_t, int64_t
23

3-
from numpy cimport int64_t, int32_t
44

55
cdef extern from "numpy/ndarrayobject.h":
66
ctypedef int64_t npy_timedelta

pandas/_libs/tslibs/offsets.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from numpy cimport int64_t
22

3+
34
cpdef to_offset(object obj)
45
cdef bint is_offset_object(object obj)
56
cdef bint is_tick_object(object obj)

pandas/_libs/tslibs/period.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ from numpy cimport int64_t
22

33
from .np_datetime cimport npy_datetimestruct
44

5+
56
cdef bint is_period_object(object obj)
67
cdef int64_t get_period_ordinal(npy_datetimestruct *dts, int freq) nogil

pandas/_libs/tslibs/timedeltas.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from cpython.datetime cimport timedelta
22
from numpy cimport int64_t
33

4+
45
# Exposed for tslib, not intended for outside use.
56
cpdef int64_t delta_to_nanoseconds(delta) except? -1
67
cdef convert_to_timedelta64(object ts, str unit)

pandas/_libs/tslibs/timestamps.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from cpython.datetime cimport datetime, tzinfo
2-
32
from numpy cimport int64_t
43

54
from pandas._libs.tslibs.base cimport ABCTimestamp

pandas/_libs/tslibs/timezones.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from cpython.datetime cimport datetime, timedelta, tzinfo
22

3+
34
cdef tzinfo utc_pytz
45

56
cpdef bint is_utc(tzinfo tz)

pandas/_libs/tslibs/util.pxd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
from cpython.object cimport PyTypeObject
33

4+
45
cdef extern from *:
56
"""
67
PyObject* char_to_string(const char* data) {
@@ -26,7 +27,8 @@ cdef extern from "Python.h":
2627
const char* PyUnicode_AsUTF8AndSize(object obj,
2728
Py_ssize_t* length) except NULL
2829

29-
from numpy cimport int64_t, float64_t
30+
from numpy cimport float64_t, int64_t
31+
3032

3133
cdef extern from "numpy/arrayobject.h":
3234
PyTypeObject PyFloatingArrType_Type

pandas/_libs/util.pxd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
from pandas._libs.tslibs.util cimport *
2-
31
cimport numpy as cnp
42
from numpy cimport ndarray
53

4+
from pandas._libs.tslibs.util cimport *
5+
6+
67
cdef extern from "numpy/ndarraytypes.h":
78
void PyArray_CLEARFLAGS(ndarray arr, int flags) nogil
89

pandas/tests/tseries/offsets/test_offsets.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4441,14 +4441,7 @@ def test_week_add_invalid():
44414441

44424442

44434443
@pytest.mark.parametrize(
4444-
"attribute",
4445-
[
4446-
"hours",
4447-
"days",
4448-
"weeks",
4449-
"months",
4450-
"years",
4451-
],
4444+
"attribute", ["hours", "days", "weeks", "months", "years"],
44524445
)
44534446
def test_dateoffset_immutable(attribute):
44544447
offset = DateOffset(**{attribute: 0})

0 commit comments

Comments
 (0)