Skip to content

Commit 448da4c

Browse files
committed
Support sqlparse 0.4.x
1 parent efeae8d commit 448da4c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

mssqlcli/packages/parseutils/ctes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def isolate_query_ctes(full_text, text_before_cursor):
1818
"""Simplify a query by converting CTEs into table metadata objects
1919
"""
2020

21-
if not full_text:
21+
if not full_text or not full_text.strip():
2222
return full_text, text_before_cursor, tuple()
2323

2424
ctes, _ = extract_ctes(full_text)

tests/test_sqlcompletion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ def test_create_db_with_template():
849849

850850
@staticmethod
851851
def test_specials_included_for_initial_completion():
852-
initial_texts = ('', ' ', '\t \t',)
852+
initial_texts = ('', ' ', '\t \t', '\n')
853853
for initial_text in initial_texts:
854854
suggestions = suggest_type(initial_text, initial_text)
855855
assert set(suggestions) == set([Keyword(), Special()])

0 commit comments

Comments
 (0)