From 72f2700b66c11a3daa4f1907548b2bff42cef743 Mon Sep 17 00:00:00 2001 From: Jonas Weinz Date: Mon, 4 Jun 2018 16:18:36 +0200 Subject: [PATCH] fixed some docstrings --- Project/Tools/json_stream_filter/json_stream_filter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Project/Tools/json_stream_filter/json_stream_filter.py b/Project/Tools/json_stream_filter/json_stream_filter.py index 6b12ae8..79ce936 100755 --- a/Project/Tools/json_stream_filter/json_stream_filter.py +++ b/Project/Tools/json_stream_filter/json_stream_filter.py @@ -64,7 +64,7 @@ class json_streamer(object): if key in stream_dict: for r in r_list: if r.key_to_store_match is not None: - # looking for all occurences and storing them in an on json key + # looking for all occurences and storing them in an json key matches = r.regexp_obj.findall(stream_dict[key]) stream_dict[r.key_to_store_match] = matches # TODO: can not handle multiple rules storing in the same key!!! if r.replace_str is not None: @@ -116,8 +116,8 @@ class json_streamer(object): if c == '"' and prev_c != '\\': inside_quotes = not inside_quotes - # setting previous c. only exception if a double backslash occurs ignoring it. - # Because that breaks our escaped character detection + # setting previous c. only exception: if a double backslash (= escaped backslash) occurs ignore it. + # Because that would break our escaped character detection prev_c = c if not (c == '\\' and prev_c == '\\') else '' stream_error.write("\n\nReached EOF. #Processed objects: " + str(success_batch_counter) + ", #failed objects: " + str(fail_batch_counter) + "\n\n")