fix imports and styles after refactor

This commit is contained in:
collerek
2020-09-15 12:53:14 +02:00
parent ca21e5dde5
commit 6124830642
7 changed files with 12 additions and 9 deletions

View File

@ -1,5 +1,5 @@
from _weakref import proxy
from typing import List, Type, Optional, Union, Tuple
from typing import List, Optional, TYPE_CHECKING, Tuple, Type, Union
from weakref import proxy
import ormar
from ormar.exceptions import RelationshipInstanceError
@ -8,6 +8,9 @@ from ormar.fields.many_to_many import ManyToManyField
from ormar.relations import Relation
from ormar.relations.relation import RelationType
if TYPE_CHECKING: # pragma no cover
from ormar import Model
class RelationsManager:
def __init__(
@ -125,4 +128,4 @@ class RelationsManager:
if name in item._orm:
relation_name = item.resolve_relation_name(related_model, item)
item._orm.remove(name, related_model)
related_model._orm.remove(relation_name, item)
related_model._orm.remove(relation_name, item)