Adding upstream version 1.11.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4f06f250ec
commit
9d81313c2d
7 changed files with 17 additions and 10 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
## 1.11.1 - 2024-07-04
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Fix the escape sequence warning.
|
||||||
|
|
||||||
|
|
||||||
## 1.11.0 - 2024-05-03
|
## 1.11.0 - 2024-05-03
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = "1.11.0"
|
__version__ = "1.11.1"
|
||||||
|
|
|
@ -329,7 +329,7 @@ class LiteCli(object):
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
def handle_editor_command(self, text):
|
def handle_editor_command(self, text):
|
||||||
"""Editor command is any query that is prefixed or suffixed by a '\e'.
|
R"""Editor command is any query that is prefixed or suffixed by a '\e'.
|
||||||
The reason for a while loop is because a user might edit a query
|
The reason for a while loop is because a user might edit a query
|
||||||
multiple times. For eg:
|
multiple times. For eg:
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,12 @@ cleanup_regex = {
|
||||||
# This matches everything except spaces, parens, colon, comma, and period
|
# This matches everything except spaces, parens, colon, comma, and period
|
||||||
"most_punctuations": re.compile(r"([^\.():,\s]+)$"),
|
"most_punctuations": re.compile(r"([^\.():,\s]+)$"),
|
||||||
# This matches everything except a space.
|
# This matches everything except a space.
|
||||||
"all_punctuations": re.compile("([^\s]+)$"),
|
"all_punctuations": re.compile(r"([^\s]+)$"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def last_word(text, include="alphanum_underscore"):
|
def last_word(text, include="alphanum_underscore"):
|
||||||
"""
|
R"""
|
||||||
Find the last word in a sentence.
|
Find the last word in a sentence.
|
||||||
|
|
||||||
>>> last_word('abc')
|
>>> last_word('abc')
|
||||||
|
@ -41,9 +41,9 @@ def last_word(text, include="alphanum_underscore"):
|
||||||
>>> last_word('bac $def', include='most_punctuations')
|
>>> last_word('bac $def', include='most_punctuations')
|
||||||
'$def'
|
'$def'
|
||||||
>>> last_word('bac \def', include='most_punctuations')
|
>>> last_word('bac \def', include='most_punctuations')
|
||||||
'\\\\def'
|
'\\def'
|
||||||
>>> last_word('bac \def;', include='most_punctuations')
|
>>> last_word('bac \def;', include='most_punctuations')
|
||||||
'\\\\def;'
|
'\\def;'
|
||||||
>>> last_word('bac::def', include='most_punctuations')
|
>>> last_word('bac::def', include='most_punctuations')
|
||||||
'def'
|
'def'
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -121,7 +121,7 @@ def get_editor_query(sql):
|
||||||
# The reason we can't simply do .strip('\e') is that it strips characters,
|
# The reason we can't simply do .strip('\e') is that it strips characters,
|
||||||
# not a substring. So it'll strip "e" in the end of the sql also!
|
# not a substring. So it'll strip "e" in the end of the sql also!
|
||||||
# Ex: "select * from style\e" -> "select * from styl".
|
# Ex: "select * from style\e" -> "select * from styl".
|
||||||
pattern = re.compile("(^\\\e|\\\e$)")
|
pattern = re.compile(r"(^\\e|\\e$)")
|
||||||
while pattern.search(sql):
|
while pattern.search(sql):
|
||||||
sql = pattern.sub("", sql)
|
sql = pattern.sub("", sql)
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ def subst_favorite_query_args(query, args):
|
||||||
+ query,
|
+ query,
|
||||||
]
|
]
|
||||||
|
|
||||||
match = re.search("\\?|\\$\d+", query)
|
match = re.search(r"\?|\$\d+", query)
|
||||||
if match:
|
if match:
|
||||||
return [
|
return [
|
||||||
None,
|
None,
|
||||||
|
|
|
@ -257,7 +257,7 @@ class SQLCompleter(Completer):
|
||||||
self.reserved_words = set()
|
self.reserved_words = set()
|
||||||
for x in self.keywords:
|
for x in self.keywords:
|
||||||
self.reserved_words.update(x.split())
|
self.reserved_words.update(x.split())
|
||||||
self.name_pattern = compile("^[_a-z][_a-z0-9\$]*$")
|
self.name_pattern = compile(r"^[_a-z][_a-z0-9\$]*$")
|
||||||
|
|
||||||
self.special_commands = []
|
self.special_commands = []
|
||||||
self.table_formats = supported_formats
|
self.table_formats = supported_formats
|
||||||
|
|
|
@ -309,7 +309,7 @@ def test_favorite_query_expanded_output(executor):
|
||||||
results = run(executor, "\\fs test-ae select * from test")
|
results = run(executor, "\\fs test-ae select * from test")
|
||||||
assert_result_equal(results, status="Saved.")
|
assert_result_equal(results, status="Saved.")
|
||||||
|
|
||||||
results = run(executor, "\\f+ test-ae \G")
|
results = run(executor, R"\f+ test-ae \G")
|
||||||
assert is_expanded_output() is True
|
assert is_expanded_output() is True
|
||||||
assert_result_equal(
|
assert_result_equal(
|
||||||
results,
|
results,
|
||||||
|
|
Loading…
Add table
Reference in a new issue