Skip to content

Commit

Permalink
chore: Use consistent variable to improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Apr 28, 2024
1 parent 67181ed commit e6fc5be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agate/table/from_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def from_csv(cls, path, column_names=None, column_types=None, row_names=None, sk
# more than the sniff_limit. On my machine, the buffer_size of sys.stdin.buffer is the length of the
# input, up to 65536. This assumes that users don't sniff more than 64 KiB.
# https://docs.python.org/3/library/io.html#io.BufferedReader.peek
sample = sys.stdin.buffer.peek(sniff_limit).decode(encoding, 'ignore')[:sniff_limit] # reads *bytes*
sample = f.buffer.peek(sniff_limit).decode(encoding, 'ignore')[:sniff_limit] # reads *bytes*
else:
offset = f.tell()
sample = f.read(sniff_limit) # reads *characters*
Expand Down

0 comments on commit e6fc5be

Please sign in to comment.