Commit Graph

194 Commits

Author SHA1 Message Date
jack1142 bfa1d043d7 Add RawJSON to simplejson stubs (#5921)
Update METADATA.toml version
2021-08-13 17:50:59 +02:00
Oleg Höfling 5e0fc46073 Add stubs for entrypoints package (#5831) 2021-08-13 11:24:00 +03:00
Nsukami _ 5691ea6d6a Stubs for dateparser (#5778)
Stubgen and manual fixes.

Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-08-12 18:38:52 +03:00
Sebastian Rittau 6c41e3cead Improve six stubs (#5908)
* 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.
2021-08-11 07:40:09 -07:00
Anders Kaseorg 96358fd944 beautifulsoup4 stub improvements (#5907) 2021-08-10 20:04:48 -07:00
Sebastian Rittau 978659643d Upgrade bleach version to 4 and drop Python 2 (#5897)
bleach 4 has no API changes, but dropped support for old Python
versions.
2021-08-09 07:26:30 -07:00
Akuli 191aac3b0e lowercase list and dict for 3rd party stubs (#5893)
* stubs/decorator/decorator.pyi

* stubs/frozendict/frozendict.pyi

* stubs/Jinja2/jinja2/nodes.pyi

* stubs/Pygments/pygments/token.pyi

* stubs/requests/requests/models.pyi

* stubs/Werkzeug/werkzeug/http.pyi
2021-08-08 13:25:18 -07:00
Stanislav Schmidt 64903b85d7 PyYAML: fix yaml.add_foo() functions (#5828)
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
2021-08-08 21:49:06 +03:00
Akuli ce11072dbe Big diff: use lower-case list and dict (#5888) 2021-08-08 09:26:35 -07:00
Akuli 11f54c3407 add missing arguments to croniter (#5887)
Co-authored-by: Søren Bjerregaard Vrist <sbv@csis.dk>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-08-08 18:33:16 +03:00
Akuli 1409f6e892 change ast files to use new union syntax (#5880) 2021-08-08 15:47:33 +02:00
Akuli 1154218a0e switch to new union syntax in third-party stubs (#5881) 2021-08-08 15:46:55 +02:00
Akuli ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Sebastian Rittau b4385fa127 Modernize orjson stub (#5870)
* 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
2021-08-07 08:10:03 -07:00
Jukka Lehtosalo bd416902f7 Fix annotation in selenium.webdriver.remove.webdriver (#5859)
Docstring description of the argument includes this text:

"Either a string representing URL of the remote server or
a custom remote_connection.RemoteConnection object."
2021-08-06 17:25:25 +01:00
Eric Traut 620a7ceeb8 Remove selenium.webdriver.EdgeOptions for now (#5855)
We can add it back when selenium 4 is released.
2021-08-06 07:15:31 -07:00
Jacob Walls 5e0012569d Change stub of Pillow.Image.new() to accept str for color argument (#5851) 2021-08-06 10:56:12 +02:00
Sebastian Rittau 74c3d9a093 Modernize freezegun stubs, set version (#5843) 2021-08-04 15:57:12 -07:00
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