Commit Graph

376 Commits

Author SHA1 Message Date
Akuli
832a24c8a1 Create send2trash stubs (#6000) 2021-09-03 22:51:03 +02:00
JP Sugarbroad
d5ff0e8399 dateutil.parser: Complete the isoparser module (#5983) 2021-09-02 14:57:16 +02:00
Akuli
6307bfd421 Delete yaml.CDangerLoader and yaml.CDangerDumper (#5990)
These no longer exist in PyYAML 4.2.
2021-09-01 10:50:30 +03:00
Jon Dufresne
a9a612df98 Add certifi.contents() (#5989)
Added in commit:
3e585603ff

Available since version 2020.04.05.
2021-08-31 21:10:04 -07:00
Ashley Whetter
026405b014 Add C{Full,Unsafe}Loader and UnsafeConstructor (#5988) 2021-09-01 00:50:31 +02:00
Jon Dufresne
2d8fe52d08 Remove geoip2 stubs in favor of upstream (#5964)
The geoip2 package has shipped a PEP 561 py.typed file since Jul 28,
2020.

Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-08-31 23:15:55 +02:00
Sebastian Rittau
5f77310418 Update bleach version (no changes) (#5982) 2021-08-30 07:15:23 -07:00
Jon Dufresne
4381e0a558 Remove @python2-only third party stubs that aren't also dependencies (#5975)
Closes #5969
2021-08-30 14:23:28 +02:00
Akuli
8d5452e873 do not use mypy-specific syntax in '# type: ignore' comments (#5953) 2021-08-29 03:58:34 -07:00
Sebastian Rittau
f1532745bc A few html5lib annotations (#5913) 2021-08-28 12:08:45 -07:00
Shantanu
670929e908 dateparser: use PEP 604 (#5977)
Co-authored-by: hauntsaninja <>
2021-08-28 21:03:02 +02:00
Sebastian Rittau
27af44fee2 Deprecate geoip stubs (#5967)
Geoip comes with its own type hints starting at version 4.0.2.
2021-08-28 14:58:38 +03:00
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:

30e82d4ba5/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