@@ -267,7 +267,7 @@ cdef class TextReader:
267
267
268
268
cdef:
269
269
parser_t * parser
270
- object file_handle, na_fvalues
270
+ object na_fvalues
271
271
object true_values, false_values
272
272
object handle
273
273
bint na_filter, keep_default_na, verbose, has_usecols, has_mi_columns
@@ -601,7 +601,6 @@ cdef class TextReader:
601
601
602
602
cdef _setup_parser_source(self , source):
603
603
cdef:
604
- int status
605
604
void * ptr
606
605
607
606
self .parser.cb_io = NULL
@@ -687,7 +686,6 @@ cdef class TextReader:
687
686
Py_ssize_t i, start, field_count, passed_count, unnamed_count
688
687
char * word
689
688
object name, old_name
690
- int status
691
689
uint64_t hr, data_line = 0
692
690
char * errors = " strict"
693
691
StringPath path = _string_path(self .c_encoding)
@@ -837,9 +835,6 @@ cdef class TextReader:
837
835
"""
838
836
rows=None --> read all rows
839
837
"""
840
- cdef:
841
- int status
842
-
843
838
if self .low_memory:
844
839
# Conserve intermediate space
845
840
columns = self ._read_low_memory(rows)
@@ -888,7 +883,9 @@ cdef class TextReader:
888
883
return _concatenate_chunks(chunks)
889
884
890
885
cdef _tokenize_rows(self , size_t nrows):
891
- cdef int status
886
+ cdef:
887
+ int status
888
+
892
889
with nogil:
893
890
status = tokenize_nrows(self .parser, nrows)
894
891
@@ -1331,7 +1328,8 @@ cdef:
1331
1328
1332
1329
1333
1330
def _ensure_encoded (list lst ):
1334
- cdef list result = []
1331
+ cdef:
1332
+ list result = []
1335
1333
for x in lst:
1336
1334
if isinstance (x, str ):
1337
1335
x = PyUnicode_AsUTF8String(x)
@@ -1458,7 +1456,7 @@ cdef _string_box_decode(parser_t *parser, int64_t col,
1458
1456
bint na_filter, kh_str_starts_t * na_hashset,
1459
1457
char * encoding):
1460
1458
cdef:
1461
- int error, na_count = 0
1459
+ int na_count = 0
1462
1460
Py_ssize_t i, size, lines
1463
1461
coliter_t it
1464
1462
const char * word = NULL
@@ -1517,7 +1515,7 @@ cdef _categorical_convert(parser_t *parser, int64_t col,
1517
1515
char * encoding):
1518
1516
" Convert column data into codes, categories"
1519
1517
cdef:
1520
- int error, na_count = 0
1518
+ int na_count = 0
1521
1519
Py_ssize_t i, size, lines
1522
1520
coliter_t it
1523
1521
const char * word = NULL
@@ -1581,7 +1579,6 @@ cdef _categorical_convert(parser_t *parser, int64_t col,
1581
1579
cdef _to_fw_string(parser_t * parser, int64_t col, int64_t line_start,
1582
1580
int64_t line_end, int64_t width):
1583
1581
cdef:
1584
- const char * word = NULL
1585
1582
char * data
1586
1583
ndarray result
1587
1584
@@ -1767,7 +1764,6 @@ cdef inline int _try_uint64_nogil(parser_t *parser, int64_t col,
1767
1764
Py_ssize_t i, lines = line_end - line_start
1768
1765
coliter_t it
1769
1766
const char * word = NULL
1770
- khiter_t k
1771
1767
1772
1768
coliter_setup(& it, parser, col, line_start)
1773
1769
@@ -1870,9 +1866,7 @@ cdef _try_bool_flex(parser_t *parser, int64_t col,
1870
1866
Py_ssize_t lines
1871
1867
uint8_t * data
1872
1868
ndarray result
1873
-
1874
1869
uint8_t NA = na_values[np.bool_]
1875
- khiter_t k
1876
1870
1877
1871
lines = line_end - line_start
1878
1872
result = np.empty(lines, dtype = np.uint8)
0 commit comments