Commit Graph

376 Commits

Author SHA1 Message Date
Stephen Rosen
6a9c7aff99 Add missing exceptions to requests __init__.pyi (#5840) 2021-08-02 07:29:28 -07:00
Anton Grübel
1f3c703993 add missing type hints in tabulate (#5825) 2021-08-02 09:07:49 +02:00
MapleCCC
7ce0b9d670 Update urllib3.util.retry.Retry.__init__() to match the latest version released on PyPI (#5817) 2021-07-29 20:35:24 -07:00
Bas van Beek
7c37d6117d Allow reversed to take any object implementing __len__ and __getitem__ (#5820)
`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__`.
2021-07-29 07:48:14 -07:00
Anton Grübel
3ed0bb0880 add missing type hints in termcolor (#5813) 2021-07-28 17:51:41 +02:00
Ethan Corey
69c56b9496 Fix for _SimpleStrainable type def (#5810)
Modified definitions of _SimpleStrainable and _SimpleNormalizedStrainable to include Callable[[Tag], bool] (see https://www.crummy.com/software/BeautifulSoup/bs4/doc/#a-function)
2021-07-26 20:08:43 -07:00
Sebastian Rittau
955a3e5d9d Remove PyJWT (#5767)
Closes: #4856
2021-07-24 14:08:20 -07:00
Vanessa Ung
2b4bbec0d7 Stubs for humanfriendly (#5790)
Autogenerated with stubgen + manual adjustments to fix e.g. namedtuple, Python versioning, removing unneeded imports, required stubtest packages/allowlist.
2021-07-24 14:01:26 -07:00
Shiva Raisinghani
e24f940c7d Stubs for braintree (#5789)
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.
2021-07-24 13:47:14 -07:00
Jukka Lehtosalo
1ad4b79139 Stubs for selenium (#5792)
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.
2021-07-24 13:43:24 -07:00
Shantanu
41f4f0f00f xxhash: add seed arguments, reset method, missing attributes (#5802)
Update version in METADATA.toml
2021-07-24 14:55:22 +02:00
Nipunn Koorapati
581b2d5180 Update protobuf generated stubs from mypy-protobuf 2.8 (#5804) 2021-07-23 16:21:26 -07:00
Vasily Zakharov
0baeef09a2 Fixed a bug in OpenSSL.crypto stub (#5796)
Co-authored-by: Vasily Zakharov <v.zakharov@wwpass.com>
2021-07-21 15:58:17 -07:00
Jukka Lehtosalo
2d3bde439e Stubs for mysqlclient (#5791) 2021-07-19 10:28:00 +02:00
Nipunn Koorapati
6d6250f109 Supported repeated field containers for extensions (#5788)
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.
2021-07-16 10:11:42 -07:00
Nipunn Koorapati
5199ed5bd8 Upper bound protobuf containers based on scalar/composite (#5787) 2021-07-15 22:28:16 -07:00
Jukka Lehtosalo
a0f199727b Stubs for psycopg2 (#5783) 2021-07-15 17:29:56 +02:00
Jukka Lehtosalo
937d31df69 Stubs for jsonschema (#5784) 2021-07-15 17:28:57 +02:00
Jukka Lehtosalo
6d7159c822 Stubs for prettytable (#5782) 2021-07-15 14:34:59 +02:00
Jukka Lehtosalo
2a4cc03307 Add stubs for jmespath (#5780) 2021-07-15 13:26:53 +02:00
Jukka Lehtosalo
e2fe224b52 Stubs for psutil (#5776)
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.
2021-07-15 11:37:53 +01:00
Vanessa Ung
607aa37ee9 Babel stubs (#5775)
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.
2021-07-14 09:24:19 +01:00
Nipunn Koorapati
4765978f6c Support arbitrary values for extension values (#5774)
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.
2021-07-13 21:13:45 -07:00
Shiva Raisinghani
0cd4ee39a2 Stubs for stripe (#5770)
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.
2021-07-13 15:11:27 +01:00
Vanessa Ung
80f61d2209 Stubs for oauthlib (#5766)
This was generated with stubgen, with a touch of manual intervention to clean up and 
have it pass tests.
2021-07-13 09:54:50 +01:00
Shiva Raisinghani
ce94e8bba6 Add stubs for slumber (#5764) 2021-07-12 21:03:08 +02:00
Jelle Zijlstra
7f320c6b9e Stubs for beautifulsoup4 (#5758)
Stubgen and manual fixes, don't bother with Python 2
2021-07-11 17:02:51 +03:00
Akuli
e676fcabd3 Create pygments stubs (#5759)
* 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
2021-07-11 16:27:35 +03:00
Jelle Zijlstra
a90573feb2 tornado: add some types, set version (#5742) 2021-07-11 13:17:40 +02:00
Jelle Zijlstra
80591d9f99 Fix aiofiles.base.AsyncBase.__iter__ (#5750)
Fixes #5725.

This doesn't actually work properly in mypy.
2021-07-11 10:58:10 +03:00
Nipunn Koorapati
42eec29eed Update proto stubs with latest mypy-protobuf 2.6 (#5753) 2021-07-10 17:10:39 -07:00
Nipunn Koorapati
276c225cd9 Remove FieldDescriptor fallback for protobuf extension methods (#5754)
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
2021-07-11 00:28:46 +02:00
Sebastian Rittau
8d12d6f468 Use vobject stubs in caldav (#5749) 2021-07-09 16:57:16 +03:00
Bas van Beek
5e23e2c19a Use SupportsIndex where applicable in builtins.pyi (#5739)
* Use `SupportsIndex` where applicable in `builtins.pyi`

* Remove `None` from the `int.__round__` ndigits parameter
2021-07-09 13:08:19 +03:00
kasium
c4a60ce94c Add pytest-lazyfixture stubs (#5745)
This change will add stubs for pytest-lazyfixture. It is particual useful for projects which type their tests and use pytest-lazyfixture.
The included functions and classes are the scope which can be considered documented by the module. Any other function is related to pytest hook implementations and are normally not called by an user.

Please note, that if a user uses 'pytest.lazy_fixture' these stubs will not work. As recommneded in https://github.com/TvoroG/pytest-lazy-fixture/issues/51 the package needs to imported directly.

Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-07-09 12:52:22 +03:00
Sebastian Rittau
aca5952361 Wrap vobject.win32tz in platform check (#5747) 2021-07-09 11:32:57 +02:00
Nipunn Koorapati
c5dd23ac0d Allow unicode and bytes in EnumTypeWrapper.Value (#5743) 2021-07-09 11:22:38 +02:00
Akuli
fdf073627c maybe fix stubtest (#5746)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-07-09 12:06:26 +03:00
Sebastian Rittau
a7446632f7 Add third-party vobject stubs (#5733) 2021-07-08 18:26:24 -07:00
Sebastian Rittau
788b20e326 Upgrade Pillow stubs for Pillow 8.3 (#5731)
* Upgrade Pillow stubs for Pillow 8.3

* stubtest: ignore PIL._tkinter_finder

* Annotate TiffTags.py

* Pillow: stubtest and various other fixes

* Remove tkinter modules from stubtest_allowlist
2021-07-08 18:22:07 -07:00
opsyne
9d5046ee7f polib: fix ordered_metadata return type (#5735)
Also update version in METADATA.toml.
2021-07-07 19:07:17 +02:00
Akuli
42247feefb use Self in async context managers (#5724) 2021-07-06 08:47:49 +02:00
Peter Pentchev
ff2b92f340 pathlib2: most of the methods support the "unicode" type. (#5727)
Closes: #5726
2021-07-05 12:47:18 +02:00
Sebastian Rittau
1cffceb767 Add httplib2 third-party stubs (#5713) 2021-06-30 07:54:02 -07:00
Sebastian Rittau
2b35ea5f91 Add caldav third-party stubs (#5684)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-06-30 16:28:40 +02:00
Sebastian Rittau
40b127d46a Add third-party commonmark stubs (#5702) 2021-06-30 07:19:43 -07:00
Sebastian Rittau
f260ea2383 Add html5lib third-party stubs (#5701) 2021-06-29 21:15:59 -07:00
Jake Bailey
bb981bd726 Merge last of PIL stubs from Pylance (#5706)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-06-29 21:05:04 -07:00
Jake Bailey
6b8f047b05 Update some PIL stubs (#5692)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-06-28 10:29:17 -07:00
Bas van Beek
50f5858a56 Use SupportsIndex where applicable for 5 classes (#5694)
Use `SupportsIndex` where applicable:

* `str`
* `bytes`
* `bytearray`
* `memoryview`
* `markupsafe.Markup`
2021-06-26 19:05:40 +03:00