diff options
Diffstat (limited to 'testing/mycli/fix-sqlparse.patch')
-rw-r--r-- | testing/mycli/fix-sqlparse.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/mycli/fix-sqlparse.patch b/testing/mycli/fix-sqlparse.patch new file mode 100644 index 0000000000..0ad9eb4145 --- /dev/null +++ b/testing/mycli/fix-sqlparse.patch @@ -0,0 +1,36 @@ +From 3acecd9d69e87333c1887dc2e797fa20300b9a44 Mon Sep 17 00:00:00 2001 +From: Dick Marinus <dick@mrns.nl> +Date: Sat, 18 May 2019 21:15:32 +0200 +Subject: [PATCH] fix unit tests, hard depend on 0.3.0 + +--- + mycli/packages/completion_engine.py | 2 +- + setup.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mycli/packages/completion_engine.py b/mycli/packages/completion_engine.py +index 2426f30c..c63a3428 100644 +--- a/mycli/packages/completion_engine.py ++++ b/mycli/packages/completion_engine.py +@@ -84,7 +84,7 @@ def suggest_type(full_text, text_before_cursor): + # Be careful here because trivial whitespace is parsed as a statement, + # but the statement won't have a first token + tok1 = statement.token_first() +- if tok1 and tok1.value in ['\\', 'source']: ++ if tok1 and (tok1.value == 'source' or tok1.value.startswith('\\')): + return suggest_special(text_before_cursor) + + last_token = statement and statement.token_prev(len(statement.tokens))[1] or '' +diff --git a/setup.py b/setup.py +index 67ad0c85..3081f19c 100755 +--- a/setup.py ++++ b/setup.py +@@ -21,7 +21,7 @@ + 'Pygments >= 1.6', + 'prompt_toolkit>=2.0.6', + 'PyMySQL >= 0.9.2', +- 'sqlparse>=0.2.2,<0.3.0', ++ 'sqlparse>=0.3.0,<0.4.0', + 'configobj >= 5.0.5', + 'cryptography >= 1.0.0', + 'cli_helpers[styles] >= 1.0.1', |