Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -08:00
Alex Waygood
c49c84f319
A new shade of Black ( #11362 )
2024-02-04 16:38:55 -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
Viicos
78fba20110
Make inspect.getblock more ergonomic for common input types ( #10920 )
2023-10-25 12:58:11 +01:00
Alex Waygood
03b4bb9cce
Stdlib: add many missing __hash__ and __eq__ methods ( #10464 )
2023-07-17 14:21:02 +02:00
Nikita Sobolev
31dca1d660
Update inspect for Python3.12 ( #10398 )
2023-07-03 14:54:19 +02:00
Shantanu
7114aecf77
inspect: getmodulename takes a PathLike as well as str ( #10329 )
...
Fixes #10328
2023-06-18 21:19:57 +01:00
Jelle Zijlstra
e4dcfccbd5
Update typing-extensions; some 3.12 updates ( #10200 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-05-24 11:06:55 -07:00
Alex Waygood
dd2818a41d
Stdlib: add container default values ( #9909 )
2023-03-21 09:12:34 +01:00
James Hilton-Balfe
a7c7667f7e
Add better types for predicate parameter to inspect.getx functions ( #9891 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-03-17 14:41:18 +00:00
Alex Waygood
9ed39d8796
Use typing_extensions.Self in the stdlib ( #9694 )
2023-02-09 09:12:13 +00:00
Alex Waygood
0ef9c3f8e8
Enable flake8-pyi's Y037 ( #9686 )
2023-02-06 19:01:02 -08: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
Anh71me
cc66167c38
inspect: use Literal type for Attribute.kind ( #9149 )
2022-11-10 14:15:36 +00:00
Nikita Sobolev
133e2d860d
Use Mapping instead of dict in inspect.py ( #8803 )
2022-09-28 08:39:21 -07:00
Alex Waygood
e156c63bdb
inspect, asyncio: Use more TypeGuards (#8057 )
2022-07-18 19:49:12 -07:00
Alex Waygood
edc0ecd857
Remove Python 3.6 branches from typeshed ( #8269 )
2022-07-11 10:55:17 +02:00
Alex Waygood
5b44454cf8
Improve inspect callbacks ( #8189 )
2022-06-27 07:07:09 -07:00
Jelle Zijlstra
145e659482
inspect: Add positions attributes that will be new in 3.11 ( #7688 )
2022-04-29 17:00:37 -06: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
a0b41959ec
stdlib: fix many attributes which are read-only at runtime but read-write in the stub ( #7395 )
2022-02-27 16:23:09 -08:00
Alex Waygood
3afc0b1ade
Update inspect stubs for Python 3.11 ( #7342 )
2022-02-21 16:36:01 +01:00
Alex Waygood
fbc279e3f5
stdlib: Add many missing dunder overrides ( #7231 )
2022-02-16 06:25:47 -08:00
Alex Waygood
0e185f4087
Improve inspect stubs ( #7050 )
2022-01-27 09:04:48 -08:00
Alex Waygood
a40d79a4e6
Use lowercase type everywhere ( #6853 )
2022-01-08 16:09:29 +01:00
Nikita Sobolev
9c8f0d1240
Restore Literal for CO_* constants in inspect.pyi ( #6766 )
...
First pushed in #6764 , accidentally reverted in #6765
2021-12-30 17:00:35 -06:00
Nikita Sobolev
caee9b0bea
inspect.Parameter: several attributes are read-only ( #6765 )
2021-12-30 16:02:46 -06:00
Nikita Sobolev
113cd0d49c
Use Literal for CO_* constants in inspect.pyi ( #6764 )
2021-12-30 22:50:10 +01:00
Nikita Sobolev
026b219a1d
Literal types in inspect: getcoroutinestate and getgeneratorstate (#6759 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2021-12-30 20:40:50 +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
Jelle Zijlstra
868732098e
inspect._ParameterKind.description is a property ( #6587 )
2021-12-15 13:39:42 +02:00
Jukka Lehtosalo
78806f5402
Use AbstractSet instead of set in random and inspect ( #6574 )
2021-12-13 17:26:28 +01:00
Akuli
2b702233c6
tests/check_new_syntax.py: check order of if statements ( #6423 )
2021-11-28 08:04:46 -08:00
Akuli
a5bc1e037f
Add mypy error codes to '# type: ignore' comments ( #6379 )
2021-11-26 07:07:56 +01:00
Alex Waygood
9707cb00f6
Python 3.11 removals in stdlib ( #6374 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-25 19:34:12 +02:00
Alex Waygood
5c8e68f0eb
Use lowercase set, frozenset and deque where possible ( #6346 )
2021-11-19 15:05:45 -08:00
KotlinIsland
7d9d670ff9
add TypeGuard to some inspect functions ( #6107 )
2021-11-09 20:08:14 +01:00
Akuli
994b69ef8f
Use lowercase tuple where possible ( #6170 )
2021-10-14 17:18:19 -07:00
KotlinIsland
b7d1d099d9
add TypeGuard to coroutines.iscoroutine ( #6105 )
...
make CoroutineType extend Coroutine
2021-10-09 17:01:36 +02:00
Ju4tCode
328d09a9a5
Fix error type for inspect Parameter/Signature empty ( #6073 )
2021-09-27 13:49:22 +02:00
Anton Grübel
caa642dd3b
improve typing in inspect ( #6020 )
2021-09-18 20:11:55 -07:00
Bas van Beek
b9e1d7d522
Replace Mapping with types.MappingProxyType ( #6013 )
...
Mark `Signature.parameters` and `.return_annotation` as read-only properties
2021-09-09 09:58:53 +02:00
Oleg Höfling
64f481189f
drop ellipsis assignments from module vars, classvars and instance attrs ( #5914 )
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com >
2021-08-11 19:26:58 +02:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
Oleg Höfling
41630486e3
Add Typeguard back to inspect.isclass() return type ( #5829 )
2021-08-02 09:19:11 +02:00