From cc23b5a8796bf71cc3fd04e3d7b48dde562985bf Mon Sep 17 00:00:00 2001 From: collerek Date: Tue, 29 Dec 2020 17:56:35 +0100 Subject: [PATCH] fix mypy --- ormar/models/metaclass.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ormar/models/metaclass.py b/ormar/models/metaclass.py index c19cfba..baafb50 100644 --- a/ormar/models/metaclass.py +++ b/ormar/models/metaclass.py @@ -362,10 +362,8 @@ def copy_data_from_parent_model( # noqa: CCR001 copy_field.related_name = related_name through_class = field.through - new_meta: ormar.ModelMeta = type( - "Meta", - (), # type: ignore - dict(through_class.Meta.__dict__), + new_meta: ormar.ModelMeta = type( # type: ignore + "Meta", (), dict(through_class.Meta.__dict__), ) new_meta.tablename += "_" + meta.tablename # create new table with copied columns but remove foreign keys