Commit Graph
9 Commits
Author SHA1 Message Date
Nipunn Koorapati a3b3f6845b Allow unicode and bytes in the EnumTypeWrapper.Value classmethod (#5004)
Here is a unit test which shows that this behavior is accepted
by protobuf itself at runtime in both py2 and py3
https://github.com/dropbox/mypy-protobuf/pull/205
2021-02-04 15:03:37 +00:00
Nipunn Koorapati a0cc2f537d Add __eq__ override to ScalarMap and MessageMap of google/protobuf/containers.pyi (#4866)
These classes are defined
https://github.com/protocolbuffers/protobuf/blob/master/python/google/protobuf/internal/containers.py
They actually inherit from a copy-pasta of the Mapping superclass which
includes an __eq__ override, but this is close enough. It prevents
strict equality checks between these and Dicts from failing
2020-12-28 13:12:53 +01:00
Nipunn Koorapati 4f81ac10ae Update mypy protobuf pin to include well_known_types (#4850) 2020-12-23 09:47:33 +01:00
Nipunn Koorapati 9af49c0b69 Protobuf stubs update using mypy-protobuf (#4785)
* Add script to generate protoc stubs using mypy-protobuf generated stubs

* Use generate_proto_stubs to generate stubs for protobuf 3.14.0

* Skip _pb2.pyi from flake8,black,isort,pytype
2020-11-25 10:48:26 -08:00
Nipunn Koorapati ad8fd9dba7 Add typing for google protobuf mapping containers (#4265) 2020-06-30 09:37:50 +02:00
Nipunn Koorapati ca5cb9d006 Restore the global SSL flags to typeshed (#4247)
Audited this - and ensured the globals were gated under
the appropriate python versions for the boolean vars.
https://docs.python.org/3/library/ssl.html

Fixes #4246
2020-06-19 17:41:28 -07:00
Nipunn Koorapati 1436181587 Make EnumTypeWrapper generic in google.protobuf.internal (#3995)
This is necessary so that mypy-protobuf can autogenerate NewType
wrappers around the int values of the enum!
2020-05-18 21:42:47 +02:00
Nipunn Koorapati f0927787f0 Update type var typing on protobuf message.pyi (#3996)
Add support for message type var generics
2020-05-18 11:59:37 -07:00
Nipunn Koorapati 67d091db15 Update google RepeatedCompositeFieldContainer (#3136) 2019-07-22 09:00:22 +02:00