Rebecca Chen
fac273a545
Stop using pytype.pytd.typeshed.get_python_major_versions. ( #5941 )
...
We deleted this method as part of our Python 2 cleanup efforts.
2021-08-19 18:36:19 -07:00
Anton Grübel
c54909ab69
Use ParamSpec for unittest.signals.removeHandler() ( #5905 )
2021-08-19 18:32:24 +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
wouter bolsterlee
757d962237
Improve ssl module annotations ( #5934 )
...
This improves the type annotations for the ‘ssl’ module:
- Various APIs taking file names (e.g. keyfile=, certfile=, cafile=,
capath=, ...) were annotated as accepting only strings, while actually
they accept str, bytes, and os.PathLike (such as pathlib.Path).
CPython's _ssl.c module has always used PyUnicode_FSConverter to
handle (normalize) these. Change the annotations accordingly using the
internal _typeshed.StrOrBytesPath alias.
- Tighten the ‘purpose=’ argument in various functions to use the
already defined ‘Purpose’ enum instead of accepting ‘Any’.
2021-08-18 08:23:31 -07:00
Louis Duperier
bfff7d763b
add type stubs ( #5932 )
2021-08-18 17:02:14 +03:00
Nathan Naze
34b3f0bf7c
Add missing attributes to IncompleteRead ( #5933 )
2021-08-17 21:27:09 -07: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
Sebastian Rittau
5f2e117bba
CONTRIBUTING: Use PEP 604 syntax ( #5925 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-08-14 20:48:40 -07:00
Jeremy Nation
0e62c8ab06
Add missing stub for _CursesWindow.noutrefresh ( #5928 )
2021-08-14 23:55:43 +02:00
Sam Martin
c83a455d67
Fix malformed typeschool URL ( #5927 )
2021-08-14 22:57:46 +03: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
9715657994
bump black + isort ( #5926 )
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com >
2021-08-14 14:03:58 +02: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
Oleg Höfling
ff63953188
Switch to PEP-604 syntax in python2 stubs ( #5915 )
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com >
2021-08-14 11:12:30 +02:00
Rebecca Chen
431c4f7fc1
Improve a few types in xml.dom.minidom. ( #5923 )
...
* Changes the return type of getDOMImplementation from implicit Any to
DOMImplementation | None.
* DOMImplementation.createDocument() and createDocumentType() allow None for all arguments.
2021-08-13 23:28:47 +02:00
Rebecca Chen
774da45449
Add some missing properties to xml.dom.minidom.Node. ( #5919 )
2021-08-13 21:57:22 +02:00
jack1142
e415a7fad8
Make ChainMap's new_child() and parents return subclass ( #5922 )
2021-08-13 19:30:48 +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
Gabe Joseph
92aecadf6b
Memoryview.cast: shape= can be tuple of any number of ints (#5918 )
2021-08-13 00:04:35 +02: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
Anton Grübel
ae86a93f45
add ParamSpec to atexit ( #5896 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-08-11 20:49:30 -07:00
Rebecca Chen
10cfccfafd
Bump pytype version to 2021.08.11. ( #5916 )
...
This version contains a fix for a pytype bug that is blocking
https://github.com/python/typeshed/pull/5896 .
2021-08-11 19:58:37 -07:00
Oleg Höfling
64f481189f
drop ellipsis assignments from module vars, classvars and instance attrs ( #5914 )
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com >
2021-08-11 19:26:58 +02: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
Rebecca Chen
4e228870bb
Stop running pytype_test on Python 2-only stubs. ( #5904 )
...
pytype is finally dropping Python 2 support (in the upcoming release
after 2021.08.03), so pytype_test can no longer run with
--python_version=2.
2021-08-10 09:36:10 +02:00
Sténio Jacinto
32a6257de0
Add missing stdlib xml stubs ( #5895 )
2021-08-09 22:41:55 +02:00
Shantanu
98846a65e2
More shards for stubtest_third_party ( #5902 )
...
Co-authored-by: hauntsaninja <>
2021-08-09 13:36:54 -07:00
Sebastian Rittau
30ad9e945f
Mention discussions forum ( #5901 )
2021-08-09 22:11:41 +02: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
9af9cca7f3
lowercase list and dict in the rest of stdlib ( #5892 )
2021-08-09 00:13:08 +02: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
Bas van Beek
7edad1034e
Use a typevar in object.__new__ ( #5891 )
2021-08-08 20:45:22 +02:00
Hasan Ramezani
8b9d771b67
Add filters to stdlib/warnings.pyi ( #5889 )
2021-08-08 21:18:47 +03:00
Akuli
24780a3e03
imaplib, nntplib, plistlib, poplib: use lower-case list and dict ( #5890 )
2021-08-08 18:46:23 +02: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
b1d1551bbc
tkinter.Canvas: types for addtag_foo() and find_foo() methods ( #5886 )
2021-08-08 17:14:45 +03:00
Kyle Altendorf
4b77d454bd
dataclasses: Allow Any keys for the metadata field ( #5823 )
2021-08-08 15:50:52 +02:00
Akuli
c0e2346346
new union syntax in CONTRIBUTING.md ( #5879 )
2021-08-08 15:48:56 +02: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
c12c93ebe4
use new union syntax in stdlib/types.pyi ( #5882 )
2021-08-08 15:46:09 +02:00
Akuli
1395318faa
use new union syntax in ctypes/__init__.pyi ( #5883 )
2021-08-08 15:45:28 +02:00
Akuli
df6a211855
Use new union syntax in rest of stdlib ( #5884 )
2021-08-08 15:44:30 +02:00
Akuli
ebacd320a3
support passing coordinate tuples to tkinter.Canvas.create_foobar() ( #5885 )
2021-08-08 15:43:28 +02:00