Stephen Morton
3944c7839e
Add __hash__ for a bunch of types that set it to None ( #13286 )
2024-12-23 23:16:22 -08:00
Ali Hamdan
1de78260d9
optparse: Improve Option typing ( #13282 )
2024-12-23 07:16:00 -08:00
Ali Hamdan
7c0974c0cd
optparse: Precise types for OptionParser.add_option_group ( #13277 )
...
Precise types for OptionParser.add_option_group
These `*args` and `**kwargs` are forwarded to the `OptionGroup`
constructor with `title` made positional-only here because of
the `args[0]` check at runtime
2024-12-22 16:21:47 -08:00
Ali Hamdan
82352521bf
optparse: improve HelpFormatter annotations ( #13278 )
2024-12-22 16:18:20 -08:00
Stephen Morton
364fd7d18f
a few more allowlist entries moved to don't fix ( #13236 )
2024-12-13 14:59:47 -08:00
Oleh Prypin
b2f68ec2fe
Use MaybeNone (alias to Any) when applicable ( #12855 )
2024-10-18 14:07:52 -07:00
Adam Turner
b6a142d6f5
Update OptionParser.{error,exit} to be NoReturn ( #12464 )
2024-07-31 13:20:56 +02:00
Ali Hamdan
4a70a78c26
optparse: add_option Option argument is positional only ( #11952 )
2024-05-18 06:09:09 -04:00
Sebastian Rittau
9841c255ee
Replace Any in optparse ( #11599 )
...
Co-authored-by: Ali Hamdan <ali.hamdan.dev@gmail.com >
2024-03-15 22:33:52 +01:00
Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -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
Nikita Sobolev
0259068ad6
Remove duplicate definitions in sub-classes ( #8594 )
2022-08-26 17:10:55 +02:00
Jelle Zijlstra
158293257e
optparse: fix unconstrained TypeVar ( #7936 )
...
Part of #7928
2022-05-23 19:39:31 -07:00
Alex Waygood
97a74bc1aa
Import from collections.abc wherever possible ( #7635 )
2022-04-18 12:50:37 +02:00
Alex Waygood
d6ce3abd68
Add __all__ to most modules beginning with 'n', 'o' and 'p' ( #7345 )
2022-02-21 17:57:03 -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
Nikita Sobolev
4293ad0483
optparse.check_choice returns value type (#7209 )
2022-02-14 14:14:03 -08:00
Alex Waygood
cabfaabd76
optparse.HelpFormatter: format_heading and format_usage are abstract methods (#7194 )
...
The [docstrings state](0ae4019179/Lib/optparse.py (L255-L259) ) "Subclasses must implement", and the [docs for optparse](https://docs.python.org/3/library/optparse.html ) explicitly state that `TitledHelpFormatter` and `IndentedHelpFormatter` are provided as "concrete implementations" of `optparse.HelpFormatter`.
2022-02-13 17:41:00 -08: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
Akuli
994b69ef8f
Use lowercase tuple where possible ( #6170 )
2021-10-14 17:18:19 -07: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
Sebastian Rittau
841a365284
Remove compatibility aliases ( #5464 )
...
* Remove compatibility aliases
Remove a few instances of Text
Use aliases from _typeshed
* Remove unused imports
2021-05-15 20:49:20 +03:00
Akuli
17dcea4a68
Akuli and srittau: Remove Python 2 branches from Python 3 stubs ( #5461 )
...
* run script and do some manual changes (Akuli)
* do the whole thing manually (srittau)
* merge changes (Akuli)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-05-15 15:33:39 +03:00
hatal175
bf201c8201
Various stubtest fixes ( #5215 )
2021-04-14 19:14:07 -07:00
Jon Dufresne
b03cd49a87
Type optparse.Option.default attribute ( #5080 )
...
1e3c68246e/Lib/optparse.py (L458)
2021-02-28 09:15:38 -08: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