Skip to content

type annotations for cloudpickle #590

@jorenham

Description

@jorenham

Is there interest in adding support for static typing to cloudpickle? Because if so, I'd be willing to work on that :)

To be a bit more specific, I'm talking about fully annotating the cloudpickle codebase, validate that using a static type-checker in CI, and add a py.typed (PEP 561).

The annotations could be either provided as inline annotations (which will help runtime type-checkers such as beartype), or as non-intrusive .pyi stubs that live next to the .py sources. The latter would make things a bit more complicated on the CI side of things, because we'll then have to validate that the stubs match the runtime definitions using a tool like mypy's stubtest. Generally speaking, inline annotations are preferred. And I think that in case of cloudpickle that'd indeed be the best choice. But if you want to go with .pyi stubs instead, then that's also fine as far as I'm concerned.

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