mypy m2m iterator fix (#655)
* feat: add type hint for items in iterators for m2m relations * chore: make flake8 happy - rename some variables - reorder some imports * switch to typing.List Co-authored-by: Benjamin Mollier <benjamin.mollier@meetap.de> Co-authored-by: collerek <collerek@gmail.com>
This commit is contained in:
@ -79,9 +79,9 @@ class SavePrepareMixin(RelationMixin, AliasMixin):
|
||||
|
||||
@classmethod
|
||||
def translate_enum_columns(cls, new_kwargs: dict) -> dict:
|
||||
for k, v in new_kwargs.items():
|
||||
if isinstance(v, Enum):
|
||||
new_kwargs[k] = v.name
|
||||
for key, value in new_kwargs.items():
|
||||
if isinstance(value, Enum):
|
||||
new_kwargs[key] = value.name
|
||||
return new_kwargs
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user