Commit Graph

6597 Commits

Author SHA1 Message Date
KotlinIsland
35a59f6aa7 typing.AwaitableGenerator: add type_check_only (#8115) 2022-06-20 21:01:09 -07:00
Shantanu
6fd87aca20 [stubsabot] Bump flake8-bugbear to 22.4.25 (#8112)
Co-authored-by: hauntsaninja <>
2022-06-20 16:29:31 -07:00
Alex Waygood
c6de37df53 Overhaul socket stubs on Windows and MacOS (#8106)
Reduce the `socket` allowlists for these platforms to a handful of missing constants
2022-06-20 20:11:50 +01:00
Sebastian Rittau
6a64e69054 Update redis stubs to 4.3 (#8108) 2022-06-20 12:09:38 -07:00
Alex Waygood
538621e91b unittest.case: tighter annotations for various assertions (#8077) 2022-06-20 18:49:57 +02:00
Alex Waygood
bae4fd2209 Upgrade pyright (#8110) 2022-06-20 17:07:43 +01:00
Lefteris Karapetsas
01efba913f dbapi2 set_progress_handler should return integer (#8109)
dbapi2 set_progress_handler callback should return an int according to the
stdlib documentation: https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.set_progress_handler

Fixes #8105
2022-06-20 13:42:58 +02:00
Shantanu
34579f1edf socket: add TCP_KEEPALIVE (#8100)
bpo-34932

Co-authored-by: hauntsaninja <>
2022-06-19 17:57:07 +01:00
Alex Waygood
411d85feeb socket.AddressFamily: Fix AF_LINK (#8103)
Slipped through the net in #8099
2022-06-19 09:10:33 +01:00
Shantanu
a9cd83adf9 Silence mysterious 3.10.5 stubtest failure (#8102)
Fixes #8098 (along with #8099)
2022-06-19 00:58:43 -07:00
Shantanu
b7f8d847be socket: consistency between constants and enums (#8099)
This matches what happens at runtime, from Enum._convert_
Helps with #8098. Closes #5696.
2022-06-19 08:57:55 +01:00
Shantanu
64181e8dad stubtest: use separate table in METADATA.toml (#8096) 2022-06-19 00:43:24 -07:00
Shantanu
42409735b2 Bump oauthlib to 3.2.* (#8081) 2022-06-18 16:27:10 +02:00
Shantanu
225c14c16f [stubsabot] Bump Pygments to 2.12.* (#8093)
Co-authored-by: hauntsaninja <>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-06-18 08:58:29 +01:00
Shantanu
b7af592718 [stubsabot] Bump paramiko to 2.11.* (#8091)
Co-authored-by: hauntsaninja <>
2022-06-18 08:51:10 +01:00
Shantanu
5f1f6dc310 redis: remove duplicate allowlist entries (#8097)
Co-authored-by: hauntsaninja <>
2022-06-18 08:42:07 +01:00
John Villalovos
fc69e0053a imaplib: fix exception types (#8095)
Closes #8094
2022-06-17 23:45:10 -07:00
Shantanu
c31baed61d [stubsabot] add script (#8035) 2022-06-17 21:52:36 -07:00
eggplants
c383e95286 Fix box parameter type of Pillow.PIL.Image.paste (#8090)
When executing `img.paste(cropped, box=(10.5, 10.5))`:
TypeError: 'float' object cannot be interpreted as an integer

So the `box` parameter's type should be not `tuple[float, float]` but `tuple[int, int]`. (same as `_Box`)
2022-06-16 16:50:14 -07:00
Alex Waygood
6b0c8df9ec Upgrade pyright, improve pyright config files (#8072) 2022-06-16 18:50:50 +01:00
Alex Waygood
a2ef47660a Fix TypeVars in beautifulsoup and SQLAlchemy (#8087) 2022-06-16 17:34:27 +02:00
Alex Waygood
43f923b6c2 protobuf: Delete some __new__ and __init__ methods (#8088) 2022-06-16 17:10:14 +02:00
Alex Waygood
4967c8bc12 redis: fix more unconstrained TypeVars (#8084) 2022-06-15 10:14:13 -07:00
Alex Waygood
5fa31e6759 Remove mypy error codes from the test_cases directory (#8083) 2022-06-15 15:31:45 +01:00
Pierre-Marie de Rodat
640053e8e3 Add stubs for "gdb" (#8013)
This commit adds type stubs for the "gdb" package, the Python API to
extend GDB (https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html).
2022-06-14 22:28:54 -07:00
Shantanu
8cac5284ae [stubsabot] Bump braintree to 4.15.* (#8080)
Co-authored-by: hauntsaninja <>
2022-06-14 22:04:35 +01:00
Shantanu
2755d8c310 [stubsabot] Bump pyfarmhash to 0.3.* (#8079)
Co-authored-by: hauntsaninja <>
2022-06-14 22:03:53 +01:00
Shantanu
1fab7f76fb [stubsabot] Bump ujson to 5.3.* (#8078)
Co-authored-by: hauntsaninja <>
2022-06-14 21:44:12 +01:00
Prometheus3375
91d6383d9d Change return type of XMLPullParser.read_events() (#8076) 2022-06-14 19:15:29 +01:00
Alex Waygood
01d5e28ff7 Fix miscellaneous invalid TypeVar usages (#8074) 2022-06-14 08:48:41 -07:00
Alex Waygood
4941ac0263 Use the Any trick for xml.etree.ElementTree.getroot() (#8069)
Closes #7770
2022-06-14 18:31:19 +03:00
Alex Waygood
5add91d6bb unittest: Improve self.assert(Not)AlmostEqual(s) (#8066) 2022-06-14 18:24:51 +03:00
Alex Waygood
7de1ed9589 cachetools: Fix invalid TypeVar usage (#8073) 2022-06-14 06:39:45 -07:00
Stephen Rosen
199132122b Add pre-commit config for flake8 (#8068)
This makes it easier to lint your own work with `pre-commit`, but doesn't change the CI config by adding this to the pre-commit.ci skip list.

There's no way to automatically reflect the additional dependencies from the requirements file, so the flake8 plugin list needs to be a verbatim copy.

resolves #7991
2022-06-14 02:30:09 +01:00
Alex Waygood
60c2733ca8 subprocess.(check_)call: add text argument new in 3.7 (#8070) 2022-06-14 01:54:16 +01:00
Alex Waygood
1828ba2045 builtins.sum: Items in the iterable must support addition with int if no start value is given (#8000) 2022-06-13 11:25:38 +01:00
Shantanu
7c473240ff [stubsabot] Bump flake8-simplify to 0.19.* (#8052) 2022-06-13 12:24:49 +02:00
Alex Waygood
67828bd598 xml.etree.ElementTree.Element: remove inheritance from MutableSequence (#8056) 2022-06-13 12:22:28 +02:00
Lee
70d903c8b6 markdown: annotate HtmlStash. (#8067) 2022-06-13 10:47:51 +02:00
Alex Waygood
1be5918baa Use _typeshed.IdentityFunction more consistently (#8063) 2022-06-12 16:56:14 -07:00
Alex Waygood
033516d39f flake8 config: Ignore more error codes in .py files (#8065)
black fixes these for us in `pre-commit.ci`.
2022-06-12 12:04:38 -07:00
Alex Waygood
1aa5663f9e Add __setattr__ to logging.LogRecord (#8064) 2022-06-12 12:04:22 -07:00
Oleg Höfling
8bb18aa541 add undocumented attributes for threading.Timer (#8059) 2022-06-12 20:34:56 +03:00
Alex Waygood
55eb19d1bd Improve csv.DictReader (#8061) 2022-06-12 17:02:05 +03:00
Alex Waygood
b5802d0bbe Add tkinter._test (#8062)
Fixes #7903
2022-06-12 16:58:39 +03:00
Alex Waygood
16281bb04f Improve turtle.Vec2D (#8058)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-06-12 15:53:14 +03:00
Kyle Altendorf
a750a42c65 Remove Generic from sqlite3.Row (#8036)
Introduced in https://github.com/python/typeshed/pull/7641.  Removal discussed at https://github.com/python/typeshed/issues/8027.
2022-06-11 06:53:22 -07:00
Pamela Fox
b4c3e2c3e1 Concrete return type for SymbolTable.get_identifiers (#8054) 2022-06-10 17:20:50 +02:00
Vincent Donato
ad48606a0d Add stub for emoji.is_emoji (#8053) 2022-06-10 01:08:08 +01:00
Shantanu
95128e61ec certifi: mark as obsolete since 2022.5.18.1 (#8045) 2022-06-09 15:49:23 +02:00