Merging upstream version 1.11.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
baabc68e56
commit
e81bd75194
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
|
||||
|
||||
### Improvements
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "1.11.0"
|
||||
__version__ = "1.11.1"
|
||||
|
|
|
@ -329,7 +329,7 @@ class LiteCli(object):
|
|||
exit(1)
|
||||
|
||||
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
|
||||
multiple times. For eg:
|
||||
|
||||
|
|
|
@ -12,12 +12,12 @@ cleanup_regex = {
|
|||
# This matches everything except spaces, parens, colon, comma, and period
|
||||
"most_punctuations": re.compile(r"([^\.():,\s]+)$"),
|
||||
# This matches everything except a space.
|
||||
"all_punctuations": re.compile("([^\s]+)$"),
|
||||
"all_punctuations": re.compile(r"([^\s]+)$"),
|
||||
}
|
||||
|
||||
|
||||
def last_word(text, include="alphanum_underscore"):
|
||||
"""
|
||||
R"""
|
||||
Find the last word in a sentence.
|
||||
|
||||
>>> last_word('abc')
|
||||
|
@ -41,9 +41,9 @@ def last_word(text, include="alphanum_underscore"):
|
|||
>>> last_word('bac $def', include='most_punctuations')
|
||||
'$def'
|
||||
>>> last_word('bac \def', include='most_punctuations')
|
||||
'\\\\def'
|
||||
'\\def'
|
||||
>>> last_word('bac \def;', include='most_punctuations')
|
||||
'\\\\def;'
|
||||
'\\def;'
|
||||
>>> last_word('bac::def', include='most_punctuations')
|
||||
'def'
|
||||
"""
|
||||
|
|
|
@ -121,7 +121,7 @@ def get_editor_query(sql):
|
|||
# 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!
|
||||
# Ex: "select * from style\e" -> "select * from styl".
|
||||
pattern = re.compile("(^\\\e|\\\e$)")
|
||||
pattern = re.compile(r"(^\\e|\\e$)")
|
||||
while pattern.search(sql):
|
||||
sql = pattern.sub("", sql)
|
||||
|
||||
|
@ -245,7 +245,7 @@ def subst_favorite_query_args(query, args):
|
|||
+ query,
|
||||
]
|
||||
|
||||
match = re.search("\\?|\\$\d+", query)
|
||||
match = re.search(r"\?|\$\d+", query)
|
||||
if match:
|
||||
return [
|
||||
None,
|
||||
|
|
|
@ -257,7 +257,7 @@ class SQLCompleter(Completer):
|
|||
self.reserved_words = set()
|
||||
for x in self.keywords:
|
||||
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.table_formats = supported_formats
|
||||
|
|
|
@ -309,7 +309,7 @@ def test_favorite_query_expanded_output(executor):
|
|||
results = run(executor, "\\fs test-ae select * from test")
|
||||
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_result_equal(
|
||||
results,
|
||||
|
|
Loading…
Add table
Reference in a new issue