Skip to content

Commit d84cc4e

Browse files
authored
Merge pull request #21 from Besedo/manage-all-jsons
Remove unused variables
2 parents 4ff9ce4 + f9311c9 commit d84cc4e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

json_to_csv/json_to_csv.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ def read_jsons_chunks(file_object, chunk_size=10000):
233233

234234
# Initialize those
235235
example = ""
236-
c_bef = ""
237-
c_2bef = ""
238236
continue
239237
# If we are in between 2 json examples or at the beginning
240238
elif c in ['[', ',', '\n'] and nb_bracket == 0 and nb_quotes % 2 == 0:
@@ -251,10 +249,7 @@ def read_jsons_chunks(file_object, chunk_size=10000):
251249
count_escape_char = 0
252250
# Append character to the json example
253251
example += c
254-
255-
# Set previous characters
256-
c_2bef = c_bef
257-
c_bef = c
252+
258253
# If at the end of the chunk, read new chunk
259254
if k == len(chunk) - 1:
260255
chunk = file_object.read(1000000)

0 commit comments

Comments
 (0)