Stephen Morton
1a0b507ae7
add unittest.mock.Base to MagicMixin and MagicProxy ( #12747 )
...
This matches the runtime.
2024-10-06 13:17:42 -07:00
sobolevn
6f248dfa37
Bump mypy to 1.11.1 ( #12463 )
2024-08-04 23:19:28 -07:00
Max Muoto
9bf9d1571e
Fix unittest for 3.13 ( #12307 )
2024-07-10 10:23:58 +02:00
Alex Waygood
d0f2be92ab
Bump pyright to v1.1.360 ( #11810 )
2024-04-24 14:09:16 +02:00
Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -08:00
Sebastian Rittau
53a8193d64
Update typing_extensions imports in stdlib ( #11244 )
...
Co-authored-by: AlexWaygood <alex.waygood@gmail.com >
2024-01-05 08:15:19 -08:00
Sebastian Rittau
23604858a6
Remove Python 3.7 branches ( #11238 )
2024-01-05 11:39:39 +01:00
Alex Waygood
10febc4fe0
stdlib: remove unused type: ignore comments ( #11061 )
2023-11-23 14:00:07 +01: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
Nikita Sobolev
032f9195f9
Add a more precise signature for AsyncMock.reset_mock() ( #10481 )
2023-07-19 13:25:20 +01:00
Sebastian Rittau
7ea173c4ad
Fix @patch when new is missing ( #10459 )
2023-07-14 12:53:13 +02:00
Shantanu
9e86c6026a
unittest.mock: use ParamSpec in patch ( #10325 )
...
Fixes #10324
2023-06-20 13:48:49 +02:00
Lucina
41b8981368
unittest.mock.__version__ was removed in 3.9 ( #10056 )
...
See the first entry in https://docs.python.org/3/whatsnew/3.9.html#removed
2023-04-17 11:51:34 -06:00
Alex Waygood
dd2818a41d
Stdlib: add container default values ( #9909 )
2023-03-21 09:12:34 +01:00
Alex Waygood
257e287fec
Stdlib: correct many parameter names ( #9815 )
2023-03-04 09:53:12 +00:00
Avasam
140bba3425
Add comments when subclassing Any ( #9732 )
2023-02-14 14:11:56 +01:00
Avasam
a768744d51
Type and mark as final module-level dunders not meant to be overwritten in stdlib/ ( #9709 )
2023-02-12 16:15:20 +00:00
Alex Waygood
9ed39d8796
Use typing_extensions.Self in the stdlib ( #9694 )
2023-02-09 09:12:13 +00:00
Alex Waygood
33a62ae42d
Add more defaults to the stdlib ( #9606 )
...
Continuing work towards #8988 .
The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:
- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
2023-01-29 01:51:23 +00:00
Jelle Zijlstra
ddfaca3200
stdlib: add argument default values ( #9501 )
2023-01-18 09:37:34 +01:00
Alex Waygood
352f496d69
Unpin stubtest from Python 3.10.8 and 3.11.0 ( #9368 )
2022-12-20 20:31:13 +00:00
Nikita Sobolev
18e2ae762b
Mark first argument of __[get|set|del]attr__ as str ( #9245 )
2022-11-22 11:06:50 +00:00
Sebastian Rittau
e7e94dd101
Make unittest.patch.* methods static ( #7543 )
2022-11-01 13:09:56 +01:00
Nikita Sobolev
380022c650
Remove empty __init__ methods ( #8816 )
2022-09-30 13:08:41 +01:00
Nikita Sobolev
0259068ad6
Remove duplicate definitions in sub-classes ( #8594 )
2022-08-26 17:10:55 +02:00
Nikita Sobolev
0480550fc3
Adds missing __dir__ definitions ( #8479 )
2022-08-04 12:21:43 +02:00
Alex Waygood
edc0ecd857
Remove Python 3.6 branches from typeshed ( #8269 )
2022-07-11 10:55:17 +02:00
Alex Waygood
fffb25201a
Delete some works of fiction ( #8247 )
2022-07-06 22:49:18 +05:30
Alex Waygood
43a9ab08d7
Always use TypeAlias when assigning to Any ( #8021 )
2022-06-05 18:16:20 -07:00
Jelle Zijlstra
66383ee8e3
unittest.mock: target must be a str ( #7672 )
...
See [the CPython source](eaa85cb22f/Lib/unittest/mock.py (L1754) ). It calls `_get_target`, and [that](eaa85cb22f/Lib/unittest/mock.py (L1594) ) does `target.rsplit('.', 1)`.
2022-04-21 14:07:55 -07:00
Alex Waygood
b093c90a94
Use TypeAlias for type aliases where possible, part II ( #7667 )
2022-04-20 20:02:47 +01:00
Alex Waygood
97a74bc1aa
Import from collections.abc wherever possible ( #7635 )
2022-04-18 12:50:37 +02:00
Alex Waygood
740193a8fc
Use TypeAlias where possible for type aliases ( #7630 )
2022-04-15 18:01:00 -07:00
Alex Waygood
da3e69d093
stdlib: Improve a bunch of __(a)exit__ methods ( #7571 )
2022-04-01 08:05:25 +02:00
Alex Waygood
1245bbcc8d
Use type alias to simplify overloads in unittest.mock ( #7563 )
2022-03-29 08:19:26 +02: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
Itai Steinherz
b9909b121e
Add missing typings to unittest.mock ( #7431 )
2022-03-06 15:43:39 -08:00
Alex Waygood
1f6c691322
Add missing dunder overrides in array, tracemalloc and unittest.mock ( #7248 )
2022-02-17 13:22:33 +01:00
Alex Waygood
5a8b9dafb3
Fix various py310 stubtest errors ( #7239 )
2022-02-16 11:47:49 -08:00
Alex Waygood
fbc279e3f5
stdlib: Add many missing dunder overrides ( #7231 )
2022-02-16 06:25:47 -08:00
Alex Waygood
f4967618dd
Fix positional-only differences in many stdlib modules ( #7226 )
2022-02-15 15:14:06 +01:00
Alex Waygood
7ccbbdb30a
stdlib: Improve many __iter__ and constructor methods ( #7112 )
2022-02-02 19:14:57 +01:00
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08: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
Alex Waygood
8d5d2520ac
Use PEP 585 syntax wherever possible ( #6717 )
2021-12-28 11:31:43 +01:00
Sebastian Rittau
3fb2bcd4c1
Restore stubtest 0.930 ( #6663 )
2021-12-22 20:18:19 -08:00
Shantanu
238dff64c9
unittest.mock: add decorate_async_callable, use tuple methods ( #6438 )
...
Co-authored-by: hauntsaninja <>
2021-11-28 21:55:47 -08:00
Akuli
a5bc1e037f
Add mypy error codes to '# type: ignore' comments ( #6379 )
2021-11-26 07:07:56 +01:00