chore: fix deepsource issues

* use set comprehension instead of generator
* remove redundant else statement

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai 2020-04-29 21:58:00 +05:30
parent a73be732fd
commit 2f821f9c2d
No known key found for this signature in database
GPG key ID: 75507BE256F40CED
2 changed files with 2 additions and 3 deletions

View file

@ -776,7 +776,7 @@ class Database(object):
FROM information_schema.tables
WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
""")
tables = set(d[0] for d in table_rows)
tables = {d[0] for d in table_rows}
frappe.cache().set_value('db_tables', tables)
return tables

View file

@ -138,8 +138,7 @@ class DBTable:
if frappe.db.is_missing_column(e):
# Unknown column 'column_name' in 'field list'
continue
else:
raise
raise
if max_length and max_length[0][0] and max_length[0][0] > new_length:
if col.fieldname in self.columns: