Commit Graph

40 Commits

Author SHA1 Message Date
Alex Waygood
d0f2be92ab Bump pyright to v1.1.360 (#11810) 2024-04-24 14:09:16 +02:00
Shantanu
88fa182253 Use PEP 570 syntax in third party stubs (#11554) 2024-03-10 14:11:43 +01:00
Sebastian Rittau
b6eaadcfe5 Update typing_extensions imports in third-party stubs (#11245) 2024-01-05 15:40:13 +01:00
Sebastian Rittau
23604858a6 Remove Python 3.7 branches (#11238) 2024-01-05 11:39:39 +01:00
Alex Waygood
1d2fe59e88 Third-party stubs: remove unused type: ignores (#11063) 2023-11-23 13:35:45 +00:00
Nikita Sobolev
f0ba5ba2a2 Update unittest.mock to 3.12 (#10650)
And harmonise some annotations between the stdlib `unittest.mock` module and the third-party `mock` backport package.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-09-02 15:03:39 +01:00
Sebastian Rittau
afe18e95a9 Add an upstream_repository field to METADATA.toml (#10487)
Closes: #10478
2023-07-20 16:45:41 +02:00
Nikita Sobolev
032f9195f9 Add a more precise signature for AsyncMock.reset_mock() (#10481) 2023-07-19 13:25:20 +01:00
Nikita Sobolev
9e7477d986 Update mock to 5.1.* (#10472) 2023-07-19 13:01:01 +01:00
FasterSpeeding
a46fe43477 [mock] take an iterable of calls for assert_has_awaits(#10337) 2023-06-20 18:21:05 -07:00
FasterSpeeding
f1543903c6 use ParamSpec in patch in mock stubs (#10338) 2023-06-20 18:20:49 -07:00
Alex Waygood
bb7c376142 Add defaults for third-party stubs M-O (#9956) 2023-03-27 19:20:30 +02:00
Avasam
ed6748fb32 Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
2023-02-20 22:37:45 +00:00
Alex Waygood
7180d0223b Use typing_extensions.Self instead of _typeshed.Self (#9702) 2023-02-15 11:32:43 +01:00
Avasam
140bba3425 Add comments when subclassing Any (#9732) 2023-02-14 14:11:56 +01:00
Avasam
6ac24ed923 Replace Any with Incomplete in many places (#9565) 2023-01-18 19:12:46 +00:00
Alex Waygood
4fea314594 Replace Any with Incomplete in many places (#9558) 2023-01-18 08:48:16 +00:00
github-actions[bot]
8365b1aaef Bump mock to 5.0.* (#9423) 2023-01-04 11:29:58 +01:00
Nikita Sobolev
c7983ec8d5 Remove mock from pyright's exclude (#8942) 2022-10-20 07:11:11 -07:00
Nikita Sobolev
193172efba Mark mock as completed (#8919)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-10-19 10:40:37 -07:00
Alex Waygood
43a9ab08d7 Always use TypeAlias when assigning to Any (#8021) 2022-06-05 18:16:20 -07:00
Jelle Zijlstra
796a689fc1 mock: Fix unconstrained TypeVar (#7945)
The first overload covers the case where `new` is not given.

Part of #7928
2022-05-25 06:52:40 +01:00
Alex Waygood
ec27c00ca2 Third-party stubs: Improve several __exit__ methods (#7575) 2022-04-01 08:03:12 -07:00
Alex Waygood
340c6c97ed Add mypy error codes to type: ignores, remove unused ignores (#7504)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-19 13:10:00 +00:00
Alex Waygood
64af11c78f Correct several positional-only differences in third-party stubs (#7352) 2022-02-22 06:49:51 -08:00
Alex Waygood
b4e97a1909 Improve __enter__ & constructor methods (#7114) 2022-02-02 22:14:59 +01:00
Alex Waygood
45a2dad83c Reduce use of Any in equality methods (#7081)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-30 00:59:00 +02:00
Alex Waygood
a40d79a4e6 Use lowercase type everywhere (#6853) 2022-01-08 16:09:29 +01:00
Sebastian Rittau
e77a66aced Update pyright (#6840) 2022-01-07 18:58:15 +02:00
Sebastian Rittau
15958a2628 Fixes for third-party mock package (#6685)
Removed a few unused private classes and methods. They can be re-added if a user reports them missing.
2021-12-25 11:43:43 +02:00
Akuli
a5bc1e037f Add mypy error codes to '# type: ignore' comments (#6379) 2021-11-26 07:07:56 +01:00
Akuli
994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Sebastian Rittau
9f86972350 Add star to all non-0.1 versions (#6146) 2021-10-11 13:41:19 -07:00
Sebastian Rittau
db0f37ccdf Modernize mock stubs (#5949)
* Import from `collections.abc`, instead of `typing`.
* Replace `Text` with `str`.
* Remove version checks.
* Convert mock into a package
2021-08-23 11:53:03 -07:00
Gary Yendell
28f2953b49 mock: Remove version checks, remove Python 2 (#5948)
The mock package is a backport of the latest `unittest.mock` module for all supported Python versions, making version checks unnecessary.

Also update the package version. The latest version doesn't support Python 2 anymore.
2021-08-23 13:57:34 +02:00
Akuli
ce11072dbe Big diff: use lower-case list and dict (#5888) 2021-08-08 09:26:35 -07:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Shantanu
7244ea1f71 Test third party stubs with stubtest (#5615) 2021-06-13 00:17:40 +02:00
Eric Traut
a1f16da64e Added some missing parameter annotations and type arguments detected by pyright. (#5061)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-02-23 19:46:53 +01:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00