]> git.phdru.name Git - sqlconvert.git/commitdiff
Refactor: Rename internal `statement` to `_statement`
authorOleg Broytman <phd@phdru.name>
Thu, 21 Jan 2021 01:15:22 +0000 (04:15 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 21 Jan 2021 01:15:22 +0000 (04:15 +0300)
Rename variables in the internal loops.

demo/demo-process.py
scripts/mysql2sql

index a81f93ef1787cf1bae3658fa1a82a1ac757e8365..1fe9809ffd59490f48616c8fa20e7b15950dd822 100755 (executable)
@@ -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:
index e63c1fd8f5942f0735256d5aae12e51e3ebd318a..cacbafa13444ea26898b5dcca80b065784fad485 100755 (executable)
@@ -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: