Skip to content

Inconsistent TYPE_CHECKING guard for Validator vs RetryConfig in case.py #85

Description

@deyna256

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    debtAccumulated shortcuts and workaroundsgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions