some further cleanup and optim
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
from ormar.relations.alias_manager import AliasManager
|
||||
from ormar.relations.relation import Relation, RelationType
|
||||
from ormar.relations.relation_manager import RelationsManager
|
||||
from ormar.relations.utils import (
|
||||
get_relations_sides_and_names,
|
||||
)
|
||||
from ormar.relations.utils import get_relations_sides_and_names
|
||||
|
||||
__all__ = [
|
||||
"AliasManager",
|
||||
|
||||
@ -5,9 +5,7 @@ from ormar.fields import BaseField
|
||||
from ormar.fields.foreign_key import ForeignKeyField
|
||||
from ormar.fields.many_to_many import ManyToManyField
|
||||
from ormar.relations.relation import Relation, RelationType
|
||||
from ormar.relations.utils import (
|
||||
get_relations_sides_and_names,
|
||||
)
|
||||
from ormar.relations.utils import get_relations_sides_and_names
|
||||
|
||||
if TYPE_CHECKING: # pragma no cover
|
||||
from ormar import Model
|
||||
|
||||
@ -9,11 +9,11 @@ if TYPE_CHECKING: # pragma no cover
|
||||
|
||||
|
||||
def get_relations_sides_and_names(
|
||||
to_field: Type[BaseField],
|
||||
parent: "Model",
|
||||
child: "Model",
|
||||
child_name: str,
|
||||
virtual: bool,
|
||||
to_field: Type[BaseField],
|
||||
parent: "Model",
|
||||
child: "Model",
|
||||
child_name: str,
|
||||
virtual: bool,
|
||||
) -> Tuple["Model", "Model", str, str]:
|
||||
to_name = to_field.name
|
||||
if issubclass(to_field, ManyToManyField):
|
||||
|
||||
Reference in New Issue
Block a user