From 2c9d316a8af92358221bada1361176e1bb227401 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 21 Jan 2021 04:15:22 +0300 Subject: [PATCH] Refactor: Rename internal `statement` to `_statement` Rename variables in the internal loops. --- demo/demo-process.py | 6 +++--- scripts/mysql2sql | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/demo/demo-process.py b/demo/demo-process.py index a81f93e..1fe9809 100755 --- a/demo/demo-process.py +++ b/demo/demo-process.py @@ -15,10 +15,10 @@ def process_lines(*lines): print("----- -----") if find_error(statement): print("ERRORS IN QUERY") - for statement in process_statement(statement): - print_tokens(statement, encoding='utf-8') + for _statement in process_statement(statement): + print_tokens(_statement, encoding='utf-8') print() - statement._pprint_tree() + _statement._pprint_tree() print("-----/-----") tokens = grouper.close() if tokens: diff --git a/scripts/mysql2sql b/scripts/mysql2sql index e63c1fd..cacbafa 100755 --- a/scripts/mysql2sql +++ b/scripts/mysql2sql @@ -60,8 +60,8 @@ def main(infile, encoding, outfile, output_encoding, use_pbar, quoting_style): got_directive = is_directive_statement(statement) if got_directive: continue - for statement in process_statement(statement, quoting_style): - print_tokens(statement, outfile=outfile, + for _statement in process_statement(statement, quoting_style): + print_tokens(_statement, outfile=outfile, encoding=output_encoding) tokens = grouper.close() if tokens: -- 2.39.5