Upstreaming type annotations #407
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Hi. I'm the maintainer of a stubs-only package providing type annotations for this library: https://github.com/henribru/proto-plus-stubs
The most important part of the annotations consists of a bunch of overloads on the
Field
constructor and a descriptor method: https://github.com/henribru/proto-plus-stubs/blob/master/proto-stubs/fields.pyi#L21-L427The result of this is that type checkers like Mypy and Pyright can correctly infer the types of attributes on instances of proto-plus classes (as well as improving autocomplete in some editors):
I'm wondering if there would be any interest in me upstreaming these annotations? I think they provide a decent bit of value for consumers of the library and upstreaming would bring that benefit to a lot more users. If there is, I'd be happy to open up a PR and work with you all to land this.
The text was updated successfully, but these errors were encountered: