Commit Graph

214 Commits

Author SHA1 Message Date
Sebastian Rittau 5a7f25584e Remove tornado stubs again (#5973) 2021-08-27 20:48:32 +02:00
Jon Dufresne b50ebafa79 Tighten return type of OpenSSL Connection.get_protocol_name() (#5972)
The method always returns a str. See implementation at:

https://github.com/pyca/pyopenssl/blob/30e82d4ba5e3817a77e212540477da701460e988/src/OpenSSL/SSL.py#L2420-L2430

If version were ever None, it would raise an exception on the .decode()
line.
2021-08-27 10:54:27 -07:00
JP Sugarbroad 3dbaf34bd5 yaml.cyaml: Switch Optional to new pipe-based union (#5971) 2021-08-27 19:21:44 +02:00
Sebastian Rittau 47dd8549d2 Temporarily restore tornado stubs and add obsolete_since (#5968)
The stubs can be removed again, once a new release was built.
2021-08-27 10:00:37 -07:00
Jon Dufresne da8d291bdb Update versions of Python 2 stubs to prepare for eventual removal (#5970) 2021-08-27 18:15:13 +02:00
Jon Dufresne 2e1e91e3c8 Remove tornado stubs in favor of upstream (#5965)
The tornado package has shipped a PEP 561 py.typed file since Mar 1,
2019.
2021-08-27 08:55:41 +02:00
JP Sugarbroad 07a58c3266 Add methods to yaml.cyaml.CParser (#5963) 2021-08-26 19:28:17 -07:00
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