Commit Graph

20 Commits

Author SHA1 Message Date
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
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
a1af16bda5 fractions.pyi: Correct dunder parameter names (#8285)
This wasn't possible prior to #8280, which disabled pyright's reportSelfClsParameterName check
2022-07-12 22:40:48 +01:00
Jelle Zijlstra
2a7439e106 Revert "add overload to tuple.__new__ to better express an empty tuple" (#8278)
This reverts commit 64554bdd5d.

Also add a test case.
2022-07-12 12:29:37 -07:00
Alex Waygood
27db37240a Remove files that only exist on <=3.6, update a few comments (#8273) 2022-07-12 09:12:32 +02:00
Alex Waygood
e19073e871 Add a tiny bit more special-casing for sum (#8231) 2022-07-02 20:05:56 +01:00
Alex Waygood
208d8e1ec2 Fix assertAlmostEqual regression on mixed numeric types (#8137) 2022-06-27 08:57:36 +02:00
Alex Waygood
538621e91b unittest.case: tighter annotations for various assertions (#8077) 2022-06-20 18:49:57 +02:00
Alex Waygood
5fa31e6759 Remove mypy error codes from the test_cases directory (#8083) 2022-06-15 15:31:45 +01:00
Alex Waygood
5add91d6bb unittest: Improve self.assert(Not)AlmostEqual(s) (#8066) 2022-06-14 18:24:51 +03: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
Alex Waygood
1aa5663f9e Add __setattr__ to logging.LogRecord (#8064) 2022-06-12 12:04:22 -07:00
Sebastian Rittau
214bf15dce Use "all +=" instead of duplicating the branches (#7865) 2022-06-07 13:32:19 +02:00
Jelle Zijlstra
c35ec8ba89 contextlib: Remove explicit base class from ExitStack (#7963)
Fixes #7961
2022-05-27 09:19:18 -07:00
Jelle Zijlstra
9660ee97ee codecs: add missing function, reflect runtime import * (#7918) 2022-05-22 16:06:21 -07:00
Shantanu
032787d867 builtins: accept old-style iterables to iter (#7817) 2022-05-10 09:06:31 +02:00
Alex Waygood
bb39bdfd30 Add test cases for pow that are meant to fail a type check (#7760) 2022-05-08 08:16:37 -07:00
Alex Waygood
c3ebc7e307 More improvements to pow stubs (#7737) 2022-04-28 10:49:29 -06:00
Jelle Zijlstra
02e0c98d62 Buffer support for re (#7679) 2022-04-23 18:28:35 -07:00
Alex Waygood
2773480d13 Add regression tests for builtins.pow and object.__reduce__ (#7663) 2022-04-21 21:17:37 -07:00