mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Use py3's f-strings instead of s.format(**locals()) (#6448)
* Use py3's f-strings instead of s.format(**locals()) In light of the bug reported here https://github.com/apache/incubator-superset/issues/6347, which seems like an odd `.format()` issue in py3, I greped and replaced all instances of `.format(**locals())` using py3's f-strings * lint * fix tests
This commit is contained in:
committed by
GitHub
parent
002518ba49
commit
cc3a625a4b
@@ -100,9 +100,9 @@ class SupersetQuery(object):
|
||||
exec_sql = ''
|
||||
sql = self.stripped()
|
||||
if overwrite:
|
||||
exec_sql = 'DROP TABLE IF EXISTS {table_name};\n'
|
||||
exec_sql += 'CREATE TABLE {table_name} AS \n{sql}'
|
||||
return exec_sql.format(**locals())
|
||||
exec_sql = f'DROP TABLE IF EXISTS {table_name};\n'
|
||||
exec_sql += f'CREATE TABLE {table_name} AS \n{sql}'
|
||||
return exec_sql
|
||||
|
||||
def __extract_from_token(self, token):
|
||||
if not hasattr(token, 'tokens'):
|
||||
|
||||
Reference in New Issue
Block a user