Skip to content

Use runtime type checker typeguard to validate types #6640

@agners

Description

@agners

Description

We have PEP 484 type annotations pretty much throughout the codebase nowadays. However, sometimes the annotated type does not reflect reality (accurately). Libraries such as typeguard allow to check the type at runtime.

Since this comes with runtime overhead this is not meant to be used in production. However, it is certainly useful in testing, but might also be worth adding as a flag so it can be enabled on development systems at runtime.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions