fix: fix 'consider-using-generator' for pylint
This commit is contained in:
parent
07e90229ce
commit
95aeb87899
2 changed files with 3 additions and 6 deletions
|
@ -5,7 +5,6 @@ disable=fixme,
|
|||
arguments-differ,
|
||||
arguments-renamed,
|
||||
attribute-defined-outside-init,
|
||||
consider-using-generator,
|
||||
duplicate-code,
|
||||
keyword-arg-before-vararg,
|
||||
no-member,
|
||||
|
|
|
@ -2812,11 +2812,9 @@ class MasterView(View): # pylint: disable=too-many-public-methods
|
|||
inspector = sa.inspect(model_class)
|
||||
keys = [col.name for col in inspector.primary_key]
|
||||
return tuple(
|
||||
[
|
||||
prop.key
|
||||
for prop in inspector.column_attrs
|
||||
if all(col.name in keys for col in prop.columns)
|
||||
]
|
||||
)
|
||||
|
||||
raise AttributeError(f"you must define model_key for view class: {cls}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue