Skip to content

Add type stubs #123

@achimnol

Description

@achimnol

When importing trafaret from a type-checked codebase, it often generates type check failures (mypy) due to missing explicit __rshift__() method declaration and -> NoReturn for the Trafaret._failure() method.

I'm currently workarounding the issue by adding a custom stubs:
https://github.com/lablup/backend.ai-common/tree/main/stubs/trafaret

It would be nice if we could embed the type stubs or provide a separate type stubs package.
You may start from my privately written type stubs.

For details about writing/distributing type stubs, refer PEP-561.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions