sqlc-dev / sqlc-gen-python

MIT License
154 stars 19 forks source link

v1.2 uses Any for enum values #51

Open Goldziher opened 4 months ago

Goldziher commented 4 months ago

In v1.0

class Factacceptancestatus(str, enum.Enum):
    ACCEPTED = "ACCEPTED"
    DELETED = "DELETED"
    OPEN = "OPEN"

@dataclasses.dataclass()
class CriteriaEvidenceRecord:
    id: uuid.UUID
    assessment_criteria_id: uuid.UUID
    fact: str
    source: str
    details: str | None
    confidence: float
    signal: float
    status: Factacceptancestatus
    created_at: datetime.datetime
    updated_at: datetime.datetime
    deleted_at: datetime.datetime | None

In v1.2

class FactAcceptanceStatus(str, enum.Enum):
    ACCEPTED = "ACCEPTED"
    DELETED = "DELETED"
    OPEN = "OPEN"

@dataclasses.dataclass()
class CriteriaEvidenceRecord:
    id: uuid.UUID
    assessment_criteria_id: uuid.UUID
    fact: str
    source: str
    details: str | None
    confidence: float
    signal: float
    status: Any
    created_at: datetime.datetime
    updated_at: datetime.datetime
    deleted_at: datetime.datetime | None