In src/promptum/session/case.py, two annotation-only imports are handled differently:
if TYPE_CHECKING:
from promptum.validation.validator import Validator # deferred, used as "Validator"
from promptum.providers.retry import RetryConfig # runtime import, used bare
Both Validator and RetryConfig are used exclusively as type annotations inside the @dataclass definition — neither is instantiated in this module. There is no documented reason for Validator to be deferred while RetryConfig is imported at runtime. The asymmetry adds noise and may mislead readers about whether a circular import concern exists.
In
src/promptum/session/case.py, two annotation-only imports are handled differently:Both
ValidatorandRetryConfigare used exclusively as type annotations inside the@dataclassdefinition — neither is instantiated in this module. There is no documented reason forValidatorto be deferred whileRetryConfigis imported at runtime. The asymmetry adds noise and may mislead readers about whether a circular import concern exists.