Joween Flores
Joween Flores
> ```python > from typing import TYPE_CHECKING > if TYPE_CHECKING: > # import ... > ``` I've tried this still getting an error. `NameError: name 'Model' is not defined`
**models/devices.py** ``` from typing import TYPE_CHECKING from tortoise import Tortoise, fields from tortoise.contrib.pydantic import pydantic_model_creator from tortoise.models import Model from models.staff import StaffAccount from models.relations import resolve_relationships if TYPE_CHECKING: from...
> I faced the same issue of `circular imports` > > The only two solutions that I found were: > > 1. Club both `CustomerLogin` and `DeviceClassification` into a single...