Skip to content

[FEATURE] Reduce Nullability #968

Open
@MeinAccount

Description

@MeinAccount

Problem Statement
The Python-API is very anoying to consume in a typed setting (pyright autocomplete in VSCode, mypy Typechecker in CI/CD Pipeline), as a lot of fields are Optional / Nullable.

For instance client.jobs.list() returns a Iterator[BaseJob]. But why is BaseJob.job_id specified as Optional[int]? Can we really list a job that doesn't have an ID? Will BaseJob.settings ever be None? Will JobSettings.name ever be None? Will JobSettings.tasks ever be None? My code ends up sprinkled with a lot of assert [...] is not None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions