Commit Graph

6585 Commits

Author SHA1 Message Date
Alex Waygood
d1e80a724a Add some missing Windows constants (#8346) 2022-07-20 17:45:36 +01:00
Sebastian Rittau
73fbb53475 Update setuptools stubs (#8345)
setuptools now vendors `distutils` as `setuptools._distutils`.
2022-07-20 18:44:22 +02:00
Nikita Sobolev
f178ae0d83 Improve types of redis.connection module (#8342)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-20 13:48:13 +01:00
Shantanu
85077b273d Show all packages in environment (#8341) 2022-07-19 19:42:52 -07:00
Shantanu
c783dda71b Allowlist useless modules (#8340)
These are the ones I chose not to add from #8321

Fixes most of #8339
2022-07-19 19:15:20 -07:00
Alex Waygood
a57e182608 enum: Correct IntFlag mro on 3.11+ (#8334) 2022-07-19 21:47:37 +02:00
Sebastian Rittau
5534007189 Fix return type of email.header.decode_header() (#8337) 2022-07-19 20:43:48 +01:00
Alex Waygood
6903041744 Use CamelCase for type aliases in xml.etree.ElementPath.pyi (#8335) 2022-07-19 12:04:43 -07:00
q0w
6d0e01e62b socketserver: Set StreamRequestHandler.connection to SSLSocket (#8274) 2022-07-19 09:13:43 -07:00
Shantanu
f76c6ed55a multiprocessing: make some overloads more precise (#8330)
See discussion here: https://github.com/python/typeshed/issues/4266#issuecomment-1187867029

Co-authored-by: hauntsaninja <>
2022-07-19 16:55:23 +01:00
Sebastian Rittau
ef443b6359 Re-enable SQLAlchemy mypy tests (#8282)
These used to crash if run twice in succession locally, but the crash has been fixed on mypy 0.971
2022-07-19 16:46:39 +01:00
Alex Waygood
fceccd217c Upgrade mypy to 0.971 (#8332) 2022-07-19 16:27:05 +01:00
Alex Waygood
e2ce7c6344 stdlib: audit more callback annotations (#8209) 2022-07-19 07:07:25 -07:00
Alex Waygood
540a6b25bf Improve urllib.parse.urldefrag (#8204)
Fixes #2477
2022-07-19 07:05:09 -07:00
Ben Avrahami
25e74740ae Type async Pipeline commands explicitly (#8325) 2022-07-19 15:15:09 +02:00
Nikita Sobolev
9cda16f5df Improve redis.sentinel types (#8331) 2022-07-19 13:04:09 +02:00
Alex Waygood
e3d4bdc91a Third-party stubs: enforce CamelCase for type alias names (#8256)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-07-19 08:23:24 +01:00
Shantanu
4b34b345f1 Add missing third party modules (#8321)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: hauntsaninja <>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-19 08:11:29 +01:00
Shantanu
46937df750 wave: allow passing anonymous tuple (#8328)
Fixes #8322
2022-07-18 19:53:50 -07:00
Shantanu
4b184356f1 string: remove stray comment (#8329) 2022-07-18 19:53:15 -07:00
Alex Waygood
e156c63bdb inspect, asyncio: Use more TypeGuards (#8057) 2022-07-18 19:49:12 -07:00
Alex Waygood
4b504c78e0 Improve asyncio callbacks (#8192) 2022-07-18 19:46:38 -07:00
Graham Bleaney
9519e3652b Add LiteralString support to string module (#8268)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-18 19:34:27 -07:00
pre-commit-ci[bot]
89154bf4c8 [pre-commit.ci] pre-commit autoupdate (#8327)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/hadialqattan/pycln: v2.0.2 → v2.0.4](https://github.com/hadialqattan/pycln/compare/v2.0.2...v2.0.4)

* Update requirements-tests.txt

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-18 22:40:15 +01:00
David Hotham
6873a78b6b requests: Annotate Session.merge_environment_settings (#8313)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-18 19:54:48 +01:00
唐翔昊
341057105f pycurl: Add CurlMulti.setopt() (#8315) 2022-07-18 19:02:28 +01:00
Alex Waygood
8af41720b6 Remove frozendict stubs (#8326) 2022-07-18 18:47:06 +01:00
Shantanu
38407a7904 [stubsabot] Bump Markdown to 3.4.* (#8309) 2022-07-18 13:04:27 +02:00
Talal
4897e7ce9b Update README badges (#8323) 2022-07-18 11:33:47 +01:00
Alex Waygood
35616b439f Run pycln as a pre-commit hook in CI (#8304) 2022-07-18 09:27:28 +02:00
Shantanu
64359528fc croniter: make package, complete public API (#8316) 2022-07-17 17:08:03 -07:00
Shantanu
936314b979 Add stubsabot Github Action (#8303) 2022-07-17 13:21:51 -07:00
Shantanu
5ef20e8021 Use packaging to parse versions (#8314)
packaging is the standard tool for dealing with versions and
requirements. This allows us to easily support all PEP 508 specs.
packaging also has good error messages, so I don't create our own here.
This lets us get rid of our handrolled half parser and sanity checks.
I kept the whitespace consistency check, since that's just a formatting
lint and isn't testing the correctness of parsing (which we now
definitely do correctly).
2022-07-17 12:35:32 -07:00
Shantanu
9df28aac13 Make xxhash, editdistance into packages (#8320)
This matches the runtime. Also see #8319
2022-07-17 12:26:18 -07:00
Alex Waygood
1ebe1b463e Fix asyncio.gather regression (#8271)
Adding the empty-tuple overload caused major problems for pyright, and that overload only deals with an unlikely edge case anyway. Get rid of it, and replace the fallback overload with a more general overload.

Fixes #8270.
2022-07-16 18:56:58 +01:00
Shantanu
de1a79bd00 Make VERSIONS more accurate (#8311)
Some of the versions starting at 3.6 looked suspicious, so I
checked those against git history for the CPython repo.
2022-07-15 18:19:42 -07:00
Lee
a4b6d0b434 markdown: remove deleted methods of Registry. (#8197) 2022-07-15 22:29:13 +01:00
Sebastian Rittau
ba8ea2c911 Move Rune Tynan to former maintainers (#8306) 2022-07-15 22:13:27 +02:00
Akuli
3c90c97b9a List[Foo] + List[Bar] now returns List[Foo | Bar] (#8293)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-15 20:20:50 +03:00
Alex Waygood
0764f9f31f tqdm: Add __all__ to __init__.pyi and submodules (#8308)
Fixes #8307
2022-07-15 17:39:45 +01:00
Alex Waygood
ed0b3a4412 tqdm: Improve a few __init__ methods (#8246) 2022-07-15 10:30:24 +01:00
Shantanu
e90ee8e0d9 [stubsabot] Bump jsonschema to 4.7.* (#8299) 2022-07-15 08:40:05 +02:00
Shantanu
8fb85533cd [stubsabot] Bump setuptools to 63.2.* (#8301)
Co-authored-by: hauntsaninja <>
2022-07-14 20:48:09 -07:00
Shantanu
865eb9bd0c [stubsabot] Bump regex to 2022.7.9 (#8300)
Co-authored-by: hauntsaninja <>
2022-07-14 20:32:48 -07:00
Jelle Zijlstra
55562b83a1 threading: __exit__ only returns None (#8298)
Fixes #8297 

`threading.Lock.__exit__` is implemented in C and can only return None: 6cbb57f62d/Modules/_threadmodule.c (L200)
`threading.Condition.__exit__` returns whatever its lock's `__exit__` returns, but our type annotations indicate that the lock is always a `Lock` or an `_RLock`, and neither returns anything other than None.
2022-07-14 20:00:08 -07:00
hasier
fe44de2741 python-jose: improvements to jose.backends (#8294) 2022-07-14 19:27:27 -07:00
Alex Waygood
10f3238998 Add typing_extensions.NamedTuple (#8295)
Fixes https://github.com/python/typing_extensions/issues/56
2022-07-14 15:02:51 +01:00
Alex Waygood
9645dae925 int.denominator, int.imag: More precise return types (#8266) 2022-07-14 11:25:05 +01:00
hasier
82745be9fc Complete python-jose typing (#8258) 2022-07-13 18:01:08 +01:00
Alex Waygood
6bc6289aaf Use stricter pyright settings for some tkinter stubs (#8291) 2022-07-13 17:16:16 +02:00