Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Contributors:
* Alex Gaynor
* Branch Vincent
* Jacob Williams
* Markus Tauchnitz

Creator:
--------
Expand Down
2 changes: 1 addition & 1 deletion athenacli/completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, smart_completion=True, supported_formats=(), keyword_casing='
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
Expand Down
2 changes: 1 addition & 1 deletion athenacli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def connect(self, aws_config, database):
)

def handle_editor_command(self, text):
"""
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.
Expand Down
2 changes: 1 addition & 1 deletion athenacli/packages/parseutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}

def last_word(text, include='alphanum_underscore'):
"""
r"""
Find the last word in a sentence.
>>> last_word('abc')
'abc'
Expand Down
4 changes: 2 additions & 2 deletions athenacli/packages/special/iocommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,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)

Expand Down Expand Up @@ -213,7 +213,7 @@ def subst_favorite_query_args(query, args):

query = query.replace(subst_var, val)

match = re.search('\\$\d+', query)
match = re.search(r'\$\d+', query)
if match:
return[None, 'missing substitution for ' + match.group(0) + ' in query:\n ' + query]

Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TBD
=====

* Allow catalog to be specified as part of the database argument. ([<catalog>.]<database>)
* Fix warnings related to escape sequences when running with > Python 3.12

1.6.8 (2022/05/15)
===================
Expand Down