Open achimnol opened 2 years ago
Can I ask you to create PR with stubs, that you think we should include into trafaret? Not sure when I will be able to do it myself.
I'll make a PR to add some essential type annotations directly as .pyi files, which would sync better and be easier to maintain.
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 theTrafaret._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.