* Update version field in METADATA.toml.
* Import from collections.abc in Python 3 stub.
* Add six.__author__.
* Annotate PY2, PY3, and PY34 as literals.
* Correctly annotate *_type and replace instances where they were used
as type aliases.
* Use new union syntax in Python 2 stub.
* Use built-in generics in Python 2 stub where possible.
* Renamed _LazyDescriptor to _LazyDescr to match implementation.
* Derive _LazyDescr from object in Python 2 stub.
Added / modified types for the following functions:
- `add_implicit_resolver(...)`
- `add_path_resolver(...)`
- `add_constructor(...)`
- `add_multi_constructor(...)`
- `add_representer(...)`
- `add_multi_representer(...)`
* Remove yaml.add_constructor from allowlist
* Use TypeVars and overloads
* Use | instead of Union and Optional
* Import Callable from collections.abc, not typing
* Set version in METADATA
* Remove redundant "bytearray" from argument type
* Add obsolete_since metadata field
Docstring description of the argument includes this text:
"Either a string representing URL of the remote server or
a custom remote_connection.RemoteConnection object."
`reversed` is currently annotated as accepting either a `Sequence` or objects implementing the `__reversed__` protocol.
This however is too strict as, per its [docs](https://docs.python.org/3/library/functions.html#reversed), it can take any object that implements `__len__` and `__getitem__`.
A library that provides integration access to the Braintree Gateway.
I started with stubgen, then cleaned up to address missing functions. Testing plan is to keep an eye on CI and fix any issues that arise.
These were generated using stubgen, with manual fixes. I tried to remove
exported names that are clearly not part of the public interface, but in many
cases this wasn't obvious so I left the exports, just in case.
I had to do major changes to exported names in `selenium.webdriver` to
make it work as expected (this was originally implemented by @ilevkivskyi
in our internal stubs).
Selenium has been working on adding inline type annotations, but it's not clear
when these will be released. The release will be 4.x, and having stubs for 3.x
could still be valuable for users on older versions.
See https://github.com/dropbox/mypy-protobuf/issues/244 for the
inspiration for this. Repeated extensions are allowed by protobuf,
and they generate to extension values with repeated fields.
Notably map fields (ScalarMap and MessageMap) are NOT allowed to be
extension values - producing errors as such - so those are omitted.
testproto/test_extensions3.proto:19:6: Map fields are not allowed to be extensions.
I generated these using stubgen and made various manual tweaks to fix issues
reported by stubtest.
Some of the submodules with underscore prefixes are used by open source code,
so I'm including them.
Various definitions are platform-specific. I added some sys.platform checks, but
it's hard to get these right. We may need to iterate on them later.
Basic stubs made with stubgen & manual fixes. Also, reorder
pyrightconfig.stricter.json, I didn't realise it was mostly ordered
when I added to it previously.
Proto itself supports primitives, not just messages.
See https://github.com/dropbox/mypy-protobuf/issues/244 for an example
motivating this change.
Test Plan: I was able to use MYPYPATH to test an updated version of
mypy-protobuf with this change.
A library that provides convenient access to the Stripe API from applications.
It includes a pre-defined set of classes for API resources that initialize themselves
dynamically from API responses.
I started with stubgen, then cleaned up to address missing functions. Testing plan
is to keep an eye on CI and fix any issues that arise.
* run stubgen
* replace individual lexers with __getattr__ in lexers/__init__.pyi
* replace individual styles with __getattr__ in styles/__init__.pyi
* import-export each formatter into formatters/__init__.pyi
* clean up slightly with quick and dirty script
* manual fixing
It was there for compatibility to older versions of mypy-protobuf.
With modular typeshed, this sort of straddling code will no longer
be necessary! Thanks @ilevkivskyi