Skip to content

Commit

Permalink
Removed unused strict struct member (#38348)
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd authored Dec 8, 2020
1 parent 6ce9be6 commit 9534c26
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion pandas/_libs/parsers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ cdef extern from "parser/tokenizer.h":

char commentchar
int allow_embedded_newline
int strict # raise exception on bad CSV */

int usecols

Expand Down
9 changes: 1 addition & 8 deletions pandas/_libs/src/parser/tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ void parser_set_default_options(parser_t *self) {
self->skipinitialspace = 0;
self->quoting = QUOTE_MINIMAL;
self->allow_embedded_newline = 1;
self->strict = 0;

self->expected_fields = -1;
self->error_bad_lines = 0;
Expand Down Expand Up @@ -1031,15 +1030,9 @@ int tokenize_bytes(parser_t *self,
} else if (IS_CARRIAGE(c)) {
END_FIELD();
self->state = EAT_CRNL;
} else if (!self->strict) {
} else {
PUSH_CHAR(c);
self->state = IN_FIELD;
} else {
int64_t bufsize = 100;
self->error_msg = malloc(bufsize);
snprintf(self->error_msg, bufsize,
"delimiter expected after quote in quote");
goto parsingerror;
}
break;

Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/src/parser/tokenizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ typedef struct parser_t {

char commentchar;
int allow_embedded_newline;
int strict; /* raise exception on bad CSV */

int usecols; // Boolean: 1: usecols provided, 0: none provided

Expand Down

0 comments on commit 9534c26

Please sign in to comment.