3
0
Fork 0

fix: fix 'consider-using-generator' for pylint

This commit is contained in:
Lance Edgar 2025-09-01 11:01:26 -05:00
parent 07e90229ce
commit 95aeb87899
2 changed files with 3 additions and 6 deletions

View file

@ -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,

View file

@ -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)
]
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}")