fix: fix 'consider-using-dict-comprehension' for pylint
This commit is contained in:
parent
7a0860363c
commit
da395e1880
2 changed files with 3 additions and 2 deletions
|
@ -8,6 +8,7 @@ enable=anomalous-backslash-in-string,
|
|||
bare-except,
|
||||
broad-exception-caught,
|
||||
consider-using-f-string,
|
||||
consider-using-dict-comprehension,
|
||||
consider-using-set-comprehension,
|
||||
cyclic-import,
|
||||
dangerous-default-value,
|
||||
|
|
|
@ -149,8 +149,8 @@ def make_topo_sortkey(model):
|
|||
containing model classes.
|
||||
"""
|
||||
metadata = model.Base.metadata
|
||||
tables = dict([(table.name, i)
|
||||
for i, table in enumerate(metadata.sorted_tables, 1)])
|
||||
tables = {table.name: i
|
||||
for i, table in enumerate(metadata.sorted_tables, 1)}
|
||||
|
||||
def sortkey(name):
|
||||
cls = getattr(model, name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue