Skip to content

Commit

Permalink
using rstrip
Browse files Browse the repository at this point in the history
  • Loading branch information
Celia Ji committed Oct 10, 2022
1 parent 2160649 commit 3775b51
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions data_validation/validation_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,7 @@ def get_query_from_file(self, filename):
try:
file = open(filename, "r")
query = file.read()
query_semicolon = query[query.rfind(";") :]
if set(query_semicolon).issubset({";", " ", "\n"}):
query = query[0 : query.rfind(";")]
query = query.rstrip(";\n")
except IOError:
logging.warning("Cannot read query file: ", filename)

Expand Down

0 comments on commit 3775b51

Please sign in to comment.