From: Oleg Broytman Date: Thu, 21 Jan 2021 01:15:22 +0000 (+0300) Subject: Refactor: Rename internal `statement` to `_statement` X-Git-Tag: 0.3.0~7 X-Git-Url: https://git.phdru.name/?p=sqlconvert.git;a=commitdiff_plain;h=2c9d316a8af92358221bada1361176e1bb227401 Refactor: Rename internal `statement` to `_statement` Rename variables in the internal loops. --- 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: