Updated version of 'sqlparse' as pgcli updated and tested it.

This commit is contained in:
Akshay Joshi 2020-12-14 11:39:50 +05:30
parent c79614786f
commit 296d22ad83
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ pytz>=2020.1,<2021
simplejson==3.16.0
six>=1.12.0
speaklater==1.3
sqlparse>=0.3.0,<0.4
sqlparse>=0.3.0,<0.5
WTForms==2.2.1
Flask-Paranoid==0.2.0
psutil>=5.7.0

View File

@ -16,7 +16,7 @@ TableExpression = namedtuple("TableExpression", "name columns start stop")
def isolate_query_ctes(full_text, text_before_cursor):
"""Simplify a query by converting CTEs into table metadata objects"""
if not full_text:
if not full_text or not full_text.strip():
return full_text, text_before_cursor, tuple()
ctes, remainder = extract_ctes(full_text)