Marcell Perger
673c3c37fe
Fix types for setuptools._distutils.ccompiler.CCompiler.compile ( #11275 )
2024-01-14 14:04:38 +01: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
Shantanu
ef41a9ff1a
Remove venv for stubtest stdlib ( #10259 )
2023-06-04 14:35:40 -07:00
Alex Waygood
dd2818a41d
Stdlib: add container default values ( #9909 )
2023-03-21 09:12:34 +01:00
Henry Schreiner
2d990ee2f7
Fill out more annotations for distutils & setuptools dist ( #9895 )
...
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com >
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2023-03-17 18:48:24 +00:00
Henry Schreiner
3a82796d1e
[distutils] Add generated methods to Distribution ( #9896 )
2023-03-17 12:14:36 +01:00
Henry Schreiner
bcff9cd51f
distutils.command.build_ext: add more annotations to get_ext_* methods (#9894 )
...
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com >
2023-03-16 20:29:11 +00:00
Henry Schreiner
ed1fd8fc35
Add missing distribution attribute to distutils.cmd.Command ( #9893 )
...
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com >
2023-03-16 20:21:23 +00:00
Alex Waygood
f6df5b5dd2
Remove a default value in distutils ( #9800 )
...
Fixes #9799 .
Stubtest started failing on our `setuptools` stubs because of a default value added to our stdlib `distutils` stubs. The reason for this is because our `setuptools` stubs erroneously claim here that the `setuptools._distutils.core.Distribution` class is the same as the stdlib `distutils.dist.Distribution` class:
06755e10ba/stubs/setuptools/setuptools/_distutils/core.pyi (L3)
In actual fact, they're not, and they have different default values for this parameter. But reverting the addition of the default value is the simplest short-term fix for now.
(An alternative fix would be to just merge #9795.)
2023-02-23 22:38:11 +00:00
Alex Waygood
fbc092b4cd
Stdlib: add defaults for several functions that delegate kwargs to other functions at runtime ( #9791 )
2023-02-21 23:31:25 -08:00
Avasam
a6c6bc1b8e
Fix stdlib/disutils testing ( #9734 )
2023-02-21 08:06:20 +00:00
Avasam
140bba3425
Add comments when subclassing Any ( #9732 )
2023-02-14 14:11:56 +01: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
Akuli
37a180ef7b
Use octal for mode defaults ( #9670 )
2023-02-03 19:12:53 +00:00
Jelle Zijlstra
5b24c7bb41
stdlib: Run stubdefaulter on Linux for 3.9 ( #9663 )
2023-02-03 00:39:22 +00:00
Alex Waygood
a6919227be
Add several version-dependent default values to parameters in the stdlib ( #9631 )
2023-01-31 01:21:39 +00:00
Alex Waygood
b748a9a543
distutils.filelist overloads: Remove unnecessary = ...s (#9619 )
2023-01-30 18:02:57 +01: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
Avasam
c70d303985
Audit stdlib object annotations ( #9519 )
2023-01-17 15:40:00 +00:00
Avasam
aad1a14890
Use the FileDescriptorOrPath alias consistently in the stdlib ( #9513 )
2023-01-12 18:14:48 +00:00
Alex Waygood
e2ce7c6344
stdlib: audit more callback annotations ( #8209 )
2022-07-19 07:07:25 -07:00
Alex Waygood
6348a58b8b
Import Match and Pattern from re, not typing ( #8277 )
2022-07-12 15:32:48 +02:00
Alex Waygood
8b3b6bf7cd
stdlib: Audit Callable[<parameters>, None] annotations ( #8187 )
2022-06-27 08:08:28 +02:00
Alex Waygood
43a9ab08d7
Always use TypeAlias when assigning to Any ( #8021 )
2022-06-05 18:16:20 -07:00
Alex Waygood
76a4bd796b
Simplify and correct many numeric unions ( #7906 )
...
Unblocks PyCQA/flake8-pyi#222
2022-05-21 15:25:00 +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
a3245db63c
Remove unneeded # noqa comments, fix broken # noqa comments ( #7561 )
2022-03-28 23:17:44 +02:00
Alex Waygood
1acc8f3bd6
Use PEP 604 syntax wherever possible, part II ( #7514 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-03-19 14:27:35 +00:00
Bas van Beek
01244bb68f
Add annotations for missing disutils.extension.Extension attributes ( #7417 )
2022-03-01 21:08:11 -08:00
Alex Waygood
b8421eb5d4
Delete the contents of distutils.command.__init__ ( #7370 )
2022-02-27 16:43:11 -08:00
Nikita Sobolev
4d169eaa83
Adds bdist_wininst definition ( #7249 )
2022-02-20 22:58:48 -08:00
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08:00
Jelle Zijlstra
de5ec6a0d1
fix incorrect tuple[T] ( #6996 )
...
Found from PyCQA/flake8-pyi#135 .
2022-01-22 09:37:14 -08:00
Christian Bundy
4d085fbfc1
Fix strtobool type annotation ( #6970 )
...
Problem: strtobool returns either 0 or 1, not bool.
Solution: Fix type annotation.
2022-01-19 21:57:47 -08:00
Alex Waygood
aea52b35d1
Remove nearly all __str__ and __repr__ methods from typeshed ( #6968 )
2022-01-20 00:45:11 +01:00
Alex Waygood
96c9abb058
Always use _typeshed.Self, where applicable ( #6880 )
...
* Always use `_typeshed.Self`, where applicable
* Revert changes to `google-cloud-ndb` (ambiguous)
* Remove empty line added by script
* Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi`
* Manually add a few more that the script missed
* Improve `filelock` annotation
Source code here: 79ec7b2826/src/filelock/_api.py (L207)
* Improve `opentracing/scope` annotation
Source code here: 3e1d357a34/opentracing/scope.py (L71)
* Improve `redis/client` stub
Source code here: 15f315a496/redis/client.py (L1217)
* Improve `redis/lock` annotation
Source code here: 15f315a496/redis/lock.py (L155)
* Improve `requests/models` annotation
Source code here: d718e75383/requests/models.py (L653)
2022-01-09 19:16:19 -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
Sebastian Rittau
3fb2bcd4c1
Restore stubtest 0.930 ( #6663 )
2021-12-22 20:18:19 -08: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
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
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
2410c4f751
Add missing items for distutils.command.* ( #5773 )
...
This was mostly generated by running stubgen. Existing annotations were
kept, but converted to use PEP 604 and PEP 585.
2021-07-24 14:04:17 -07:00
Sebastian Rittau
3bb397055c
Improve distutils and lib2to3 ( #5763 )
...
Add missing elements to distutils.util:
* run_2to3()
* copydir_run_2to3()
* Mixin2to3
Use PEP 604 and PEP 585.
Add lib2to3.refactor.
2021-07-12 20:15:54 +02:00