Commit Graph

207 Commits

Author SHA1 Message Date
Sam Martin f1da797c62 Addition of aws-xray-sdk package (#5961) 2021-08-26 01:03:38 +02:00
Sebastian Rittau db0f37ccdf Modernize mock stubs (#5949)
* Import from `collections.abc`, instead of `typing`.
* Replace `Text` with `str`.
* Remove version checks.
* Convert mock into a package
2021-08-23 11:53:03 -07:00
Gary Yendell 28f2953b49 mock: Remove version checks, remove Python 2 (#5948)
The mock package is a backport of the latest `unittest.mock` module for all supported Python versions, making version checks unnecessary.

Also update the package version. The latest version doesn't support Python 2 anymore.
2021-08-23 13:57:34 +02:00
SeenicRoot 034a5f6aec Fix return type of Image.reduce() in Pillow (#5946)
Image.reduce() should return an Image instead of None.
2021-08-22 20:03:22 -07:00
Johan Walles e4879abb59 text_type should be a type alias, not a variable (#5945) 2021-08-22 12:44:23 +02:00
JHeilCoveo 7144118995 Add keys module to cachetools package (#5938) 2021-08-20 09:59:15 +02:00
Henry Schreiner 2002649395 fix(Deprecated): use literal for actions (#5939) 2021-08-19 18:06:23 +02:00
Henry Schreiner eec10a6c7a fix(Deprecated): support any warning for category (#5937) 2021-08-19 17:55:14 +02:00
Louis Duperier bfff7d763b add type stubs (#5932) 2021-08-18 17:02:14 +03:00
Marc Mueller 837b57fdd1 Rename nmap to python-nmap (#5931) 2021-08-16 16:44:04 -07:00
Hackrrr 3ce5502675 Added str type to modifying methods on PageElement (#5929)
Co-authored-by: Hackrrr <Hackrrr@users.noreply.github.com>
2021-08-15 08:15:34 -07:00
Sam Martin a2bc47a682 docutils - added missing stubs for __init__ methods (#5924)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-08-14 20:35:02 +03:00
Oleg Höfling a6ce6fdce6 More specific type hints for dateparser (#5920)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-08-14 12:33:32 +02:00
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