Skip to content

Commit 5da2527

Browse files
author
Jonathan Kummerfeld
committed
Making add semicolon required (assumed in later functions)
1 parent c90e944 commit 5da2527

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tools/canonicaliser.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,7 @@ def order_query(query, variables):
615615
return ' '.join(tokens)
616616

617617
def make_canonical(query, schema, variables, skip=set()):
618-
if 'add_semicolon' not in skip:
619-
query = add_semicolon(query)
618+
query = add_semicolon(query)
620619
if 'standardise_blank_spaces' not in skip:
621620
query = standardise_blank_spaces(query)
622621
if 'capitalise' not in skip:
@@ -718,7 +717,7 @@ def standarise_file(filename, schema_filename, log, overwrite, skip, nonjson):
718717
parser.add_argument('--testyelp', help='Run yelp test cases and exit.', action='store_true')
719718
parser.add_argument('--log', help='Print SQL before and after.', action='store_true')
720719
parser.add_argument('--fields', help='The tables and fields for these queries.', required=True)
721-
parser.add_argument('--skip', help='Functions that should not be applied (choices are [add_semicolon, standardise_blank_spaces, capitalise, standardise_aliases, order_query]).')
720+
parser.add_argument('--skip', help='Functions that should not be applied (choices are [standardise_blank_spaces, capitalise, standardise_aliases, order_query]).')
722721
parser.add_argument('--overwrite', help='Replace the file rather than creating a new one.', action='store_true')
723722
parser.add_argument('--nonjson', help='The files contain "Sentence ||| SQL" rather than json.', action='store_true')
724723
args = parser.parse_args()

0 commit comments

Comments
 (0)