Commit Graph

5193 Commits

Author SHA1 Message Date
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
Matt Vollrath
753cb4caba Override argument type of DatagramProtocol.connection_made() (#5873) 2021-08-08 11:16:26 +02:00
Akuli
ef5b4b6820 setattr: Any --> object (#5877) 2021-08-08 11:12:23 +02:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
github-actions[bot]
b9adb7a874 Remove unused stubtest allowlist entries (#5875)
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com>
2021-08-07 21:06:25 -07:00
Ron Frederick
309e7bda32 Update builtins.pyi (#5874)
Change getattr/hasattr first argument from Any to object

Fixes #5848
2021-08-07 20:46:03 -07: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
Akuli
e3f662b648 switch to lower-case "# undocumented" comments (#5871) 2021-08-07 08:00:41 -07:00
Anton Grübel
39ede0242c add missing type hints for __class_getitem__ (#5869) 2021-08-07 16:12:53 +02:00
Akuli
1cd719ba8d Add types to some untyped tkinter.Canvas methods (#5868)
* coords
* gettags
* itemconfigure, itemconfig
* tag_raise, tag_lower, their aliases
* dtag

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-08-07 17:01:56 +03:00