From e6fc5beb65f444a84b02884e9c5e7b3e344599dd Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sun, 28 Apr 2024 16:57:25 -0400 Subject: [PATCH] chore: Use consistent variable to improve readability --- agate/table/from_csv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agate/table/from_csv.py b/agate/table/from_csv.py index 6a19f1e..ebfb625 100644 --- a/agate/table/from_csv.py +++ b/agate/table/from_csv.py @@ -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*