Max Muoto
f3b1ee9604
Update argparse.BooleanOptionalAction for 3.14 ( #12489 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2024-08-10 23:53:05 +03:00
Max Muoto
9a77f6006d
Use Final for undocumented constants ( #12450 )
2024-07-28 12:02:06 +02:00
Max Muoto
0df6028dc8
Use Final for Constant Literals in the stdlib ( #12332 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-07-15 18:07:34 +01:00
Kanishk Pachauri
70d9d1fe84
fix: resolve issue with SubParsersAction.add_parser for custom ArgumentParser subclasses ( #12212 )
2024-06-25 16:44:45 -07:00
Kanishk Pachauri
309aebf9d7
fix: ArgParse's registry for the type keyword argument to add_argument ( #12194 )
2024-06-25 17:31:45 +02:00
Alex Waygood
ac6c61ba04
Stubtest stdlib: unpin 3.11 and 3.12 micro versions ( #12022 )
2024-05-23 13:24:28 -07:00
benchatt
044428446f
add field deprecated to classes and add_parser for argparse 3.13 ( #12019 )
2024-05-23 14:47:37 -04:00
benchatt
90f8cfca0b
add deprecated=False parameter to more argparse classes for 3.13 ( #12018 )
2024-05-23 14:13:41 -04:00
benchatt
cf4678c84a
Add deprecated parameter to two classes in argparse ( #12017 )
2024-05-23 13:46:06 -04:00
Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -08:00
Jelle Zijlstra
bba8cbd6f8
stdlib: more deprecations ( #11009 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-02-18 06:50:29 -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
Jelle Zijlstra
5030b7419b
stdlib: Use pos-only parameters for many Protocols ( #10985 )
2023-11-06 18:09:04 +01:00
Alex Waygood
f3506eba47
Bump various test dependency pins ( #10877 )
2023-10-13 13:07:52 +02:00
Sebastian Rittau
31ae7b13c7
Add _typeshed.sentinel ( #10582 )
2023-08-16 11:31:05 +02:00
Diogo
852882b8bf
nargs could be None in argparse.ArgumentParser.add_argument (#10509 )
2023-07-26 18:46:40 +01:00
Jakob Stadler
7dbbdb0193
Fix namespace argument regression in argparse.parse_args ( #10387 )
2023-07-19 13:35:23 +02:00
Andrew Sansom
9ca4724204
argparse: Add overloads for arg parser methods ( #10307 )
2023-06-12 18:43:07 +02:00
Shantanu
fceb3ae225
argparse: improve add_argument_group and add_mutually_exclusive_group ( #10262 )
2023-06-06 08:27:51 +02:00
Ali Hamdan
56aeeb677f
Fix groups type in argparse.HelpFormatter ( #10226 )
2023-05-27 14:44:04 +02:00
Ali Hamdan
ca701f0ef3
Type argparse.HelpFormatter._Section ( #10191 )
...
The python type system doesn't provide a way to fully express the type of
`self.NestedClass` with inheritance but this change is still an improvement
over the `Any` annotations. The usage of `_Section` is rare and subclassing
it is even rarer so this shouldn't cause trouble.
2023-05-22 07:39:46 -07:00
Alex Waygood
dd2818a41d
Stdlib: add container default values ( #9909 )
2023-03-21 09:12:34 +01:00
Alex Waygood
76bfe8b469
argparse: simplify parse_args overloads (#9798 )
2023-02-22 23:46:35 +02: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
J. Sebastian Paez
cc7d2567f2
Add _ExtendAction to argparse ( #8701 )
...
_ExtendAction was added to argparse since python 3.8.
Reference of the addition to the standard library:
python/cpython@aa32a7e
2022-09-07 21:53:35 +01:00
David Robertson
0428069fab
argparse: type subparser helper's add_parser ( #8558 )
2022-08-19 19:51:19 +03:00
Nikita Sobolev
a03e8b4949
Revert __eq__ removal ( #8487 )
...
Refs #8483
2022-08-04 23:51:42 +02:00
Nikita Sobolev
a376da87bd
Remove duplicate definitions ( #8483 )
2022-08-04 18:55:18 +02:00
Alex Waygood
6348a58b8b
Import Match and Pattern from re, not typing ( #8277 )
2022-07-12 15:32:48 +02:00
Alex Waygood
edc0ecd857
Remove Python 3.6 branches from typeshed ( #8269 )
2022-07-11 10:55:17 +02:00
Alex Waygood
e88a182573
Simplify __all__ definitions in modules beginning with 'a' to 'l' ( #8026 )
2022-06-07 15:40:48 +02:00
Alex Waygood
acc0167dc1
Fix several new-in-3.11 stubtest errors ( #7973 )
2022-06-02 18:07:38 -07:00
hamdanal
b151e0c5a7
Make usage in argparse.HelpFormatter._format_usage optional ( #7983 )
...
closes #7982
2022-05-29 15:21:20 -07:00
Jelle Zijlstra
b4518bfb2b
argparse: remove incorrect default in overload ( #7929 )
...
Part of #7928
2022-05-23 18:12:19 +01:00
Alex Waygood
c653be73b8
Use TypeAlias for argparse type aliases ( #7664 )
2022-04-20 07:32:10 -07:00
Alex Waygood
97a74bc1aa
Import from collections.abc wherever possible ( #7635 )
2022-04-18 12:50:37 +02:00
Jukka Lehtosalo
483550abe0
Drop some literal types from argparse (add_argument) ( #7614 )
...
These were introduced in #7329 and they cause false positives
in code that used to be accepted before.
2022-04-13 14:01:54 +02:00
Martin Fischer
a0901817cf
argparse: Use Literal for action & nargs add_argument parameter types ( #7329 )
2022-02-20 16:12:07 -08:00
Alex Waygood
ad6982e4b8
Add argparse.__all__ ( #7263 )
2022-02-18 17:35:27 -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
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08:00
Akuli
f9c650d167
Delete duplicate union members ( #6916 )
2022-01-14 17:41:06 +02:00
Alex Waygood
a40d79a4e6
Use lowercase type everywhere ( #6853 )
2022-01-08 16:09:29 +01:00
Alex Waygood
8d5d2520ac
Use PEP 585 syntax wherever possible ( #6717 )
2021-12-28 11:31:43 +01:00
Jelle Zijlstra
85712073ac
Remove duplicate type from ArgumentParser.add_argument ( #6652 )
2021-12-22 08:59:23 +01:00
Akuli
a5bc1e037f
Add mypy error codes to '# type: ignore' comments ( #6379 )
2021-11-26 07:07:56 +01:00