Skip to content

Commit 2f87688

Browse files
committed
fixing style issues
1 parent 1e62a59 commit 2f87688

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

pandas/_libs/hashtable_class_helper.pxi.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int_types = ['int64_t',
5555
'uint64_t',
5656
'uint32_t',
5757
'uint16_t',
58-
'uint8_t',]
58+
'uint8_t']
5959
}}
6060

6161
{{for c_type in int_types}}
@@ -564,9 +564,9 @@ cdef class {{name}}HashTable(HashTable):
564564
# We use None, to make it optional, which requires `object` type
565565
# for the parameter. To please the compiler, we use na_value2,
566566
# which is only used if it's *specified*.
567-
na_value2 = {{to_c_type}}(na_value)
567+
na_value2 = {{to_c_type}}(na_value)
568568
else:
569-
na_value2 = {{to_c_type}}(0)
569+
na_value2 = {{to_c_type}}(0)
570570

571571
with nogil:
572572
for i in range(n):
@@ -577,8 +577,8 @@ cdef class {{name}}HashTable(HashTable):
577577
labels[i] = na_sentinel
578578
continue
579579
elif ignore_na and (
580-
is_nan_{{c_type}}(val) or
581-
(use_na_value and are_equivalent_{{c_type}}(val,na_value2))
580+
is_nan_{{c_type}}(val) or
581+
(use_na_value and are_equivalent_{{c_type}}(val, na_value2))
582582
):
583583
# if missing values do not count as unique values (i.e. if
584584
# ignore_na is True), skip the hashtable entry for them,

pandas/_libs/hashtable_func_helper.pxi.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ WARNING: DO NOT edit .pxi FILE directly, .pxi is generated from .pxi.in
77
{{py:
88

99
# dtype, ttype, c_type, to_c_type, to_dtype
10-
dtypes = [('complex128', 'complex128', 'khcomplex128_t', "to_khcomplex128_t", "to_complex128"),
11-
('complex64', 'complex64', 'khcomplex64_t', "to_khcomplex64_t", "to_complex64"),
10+
dtypes = [('complex128', 'complex128', 'khcomplex128_t', \
11+
"to_khcomplex128_t", "to_complex128"),
12+
('complex64', 'complex64', 'khcomplex64_t', \
13+
"to_khcomplex64_t", "to_complex64"),
1214
('float64', 'float64', 'float64_t', "", ""),
1315
('float32', 'float32', 'float32_t', "", ""),
1416
('uint64', 'uint64', 'uint64_t', "", ""),
@@ -111,7 +113,7 @@ cpdef value_count_{{dtype}}(const {{dtype}}_t[:] values, bint dropna):
111113
with nogil:
112114
for k in range(table.n_buckets):
113115
if kh_exist_{{ttype}}(table, k):
114-
result_keys[i] = {{to_dtype}}(table.keys[k])
116+
result_keys[i] = {{to_dtype}}(table.keys[k])
115117
result_counts[i] = table.vals[k]
116118
i += 1
117119
{{endif}}

pandas/_libs/khash.pxd

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,21 @@ cdef extern from "khash_python.h":
2525
double real
2626
double imag
2727

28-
bint are_equivalent_khcomplex128_t "kh_complex_hash_equal" (khcomplex128_t a, khcomplex128_t b) nogil
28+
bint are_equivalent_khcomplex128_t \
29+
"kh_complex_hash_equal" (khcomplex128_t a, khcomplex128_t b) nogil
2930

3031
ctypedef struct khcomplex64_t:
3132
float real
3233
float imag
3334

34-
bint are_equivalent_khcomplex64_t "kh_complex_hash_equal" (khcomplex64_t a, khcomplex64_t b) nogil
35+
bint are_equivalent_khcomplex64_t \
36+
"kh_complex_hash_equal" (khcomplex64_t a, khcomplex64_t b) nogil
3537

36-
bint are_equivalent_float64_t "kh_floats_hash_equal" (float64_t a, float64_t b) nogil
37-
bint are_equivalent_float32_t "kh_floats_hash_equal" (float32_t a, float32_t b) nogil
38+
bint are_equivalent_float64_t \
39+
"kh_floats_hash_equal" (float64_t a, float64_t b) nogil
40+
41+
bint are_equivalent_float32_t \
42+
"kh_floats_hash_equal" (float32_t a, float32_t b) nogil
3843

3944
ctypedef struct kh_pymap_t:
4045
khint_t n_buckets, size, n_occupied, upper_bound

0 commit comments

Comments
 (0)