Commit Graph

5202 Commits

Author SHA1 Message Date
Marcell Perger 49d5827141 Add annotations for tkinter.ttk.LabeledScale (#11402) 2024-02-11 20:05:27 +02:00
Mike Zimin a773d3f6e7 unicodedata.pyi: Add normalization form literal (#11390) 2024-02-11 16:20:52 +01:00
Marcell Perger 5eb040b1e6 Fix tkinter.ttk's compound argument (#11393)
Allow the empty string (`""`).
2024-02-10 20:55:08 +02:00
Marcell Perger 187928d8ce Add defaults for tkinter __init__ methods (#11391)
Add defaults for `tkinter`'s `__init__` methods, see #10947 

Some notes about specific arguments:
- `variable` and `textvariable`: The default value (using `dict`) is consistently `""` but this doesn't match the annotated `Variable` type so I didn't fill these in
- `Message(padx, pady)`: The default value is `-1` which is not allowed according to the documentation so I didn't fill this in
- `Toplevel(use)`: The default value is always `""` but this doesn't match the annotated `int` type so I didn't fill this in
2024-02-10 20:51:27 +02:00
Alex Waygood 15cdc20744 Fix stdlib stubtest for Python 3.11.8 and 3.12.2 (#11384)
Fix stubtest for Python 3.11.8 and 3.12.2
2024-02-09 02:28:03 -08:00
Ran Benita a4f81a67a0 sys: add last_exc on Python>=3.12 (#11378)
https://docs.python.org/3/library/sys.html#sys.last_exc
2024-02-07 20:37:48 +00:00
M Bussonnier edf41ae5e2 Update type of Formatter.convert_field (missing |None) (#11377)
From the source it expects that the second parameter (conversion), can
be None:

```python
   def convert_field(self, value, conversion):
        # do any conversion on the resulting object
        if conversion is None:
            return value
   ...
```

Since at least 17 years according to git blame, as None is refered as
early as 11529195cae2438a3ac003babcb1b11af67c4037
And still present in main branch:

https://github.com/python/cpython/blob/ef3ceab09d2d0959c343c662461123d5b0e0b64b/Lib/string.py
2024-02-07 19:24:21 +00:00
Akuli e6e2f22e6c Annotate tkinter.Canvas.type() (#11366) 2024-02-06 07:31:59 +01:00
Takumasa N f11eb92bf4 subprocess: Use _CMD instead of str | bytes in getstatusoutput and getoutput (#11354) 2024-02-05 05:36:55 -08:00
Marcell Perger 2c29505765 Fix tkinter overrelief argument (#11360) 2024-02-05 14:40:22 +02:00
Alex Waygood a2a6aee892 Fix annotation for ast.alias.name (#11364)
This isn't necessarily always an identifier:

```pycon
>>> print(ast.dump(ast.parse('from typing import *'), indent=2))
Module(
  body=[
    ImportFrom(
      module='typing',
      names=[
        alias(name='*')],
      level=0)],
  type_ignores=[])
>>> '*'.isidentifier()
False
```
2024-02-05 01:42:20 +00:00
Alex Waygood c49c84f319 A new shade of Black (#11362) 2024-02-04 16:38:55 -08:00
Alex Waygood 4d8ee113fb Add more return types to the numbers module (#11353) 2024-02-01 18:12:41 +00:00
Stephen Morton 9877ed8092 Various ctypes improvements (#11186)
Mostly more attention paid to which classes are actually the same class
2024-01-30 22:18:00 -08:00
Christoph Tyralla 1ce82b8d3e Generalise attribute __func__ of class MethodType from FunctionType to Callable (#11201)
Let property `__func__` of class `MethodType` return `Callable[..., Any]` instead of `_StaticFunctionType` and remove the latter.

Co-authored-by: Tyralla <tyralla@bce01.de>
2024-01-30 20:22:52 -08:00
Shantanu 21f84d09c3 concurrent.futures: allow as_completed to act covariantly (#11291) 2024-01-30 20:14:29 -08:00
Sebastian Rittau 8e872a022c numbers: Remove Any annotations (#11347) 2024-01-30 15:17:06 +01:00
Shantanu 9d445b0eef Move resource.struct_rusage import (#11343) 2024-01-30 00:52:05 -08:00
Avasam 81070c4dbc posixpath.commonpath supports Iterable parameter (#11310) 2024-01-29 13:13:34 +01:00
Andrew 6d9f28a7ca http.serverBaseHTTPRequestHandler.date_time_string: timestamp is a float (#11322) 2024-01-27 12:29:24 +01:00
Oleg A b4f60ac5bf asyncio: Correct _waiters type (#11315) 2024-01-25 20:24:54 +01:00
shz42 2168ab5ff4 Add tuple key type for memoryview.__getitem__ and __setitem__ (#11296) 2024-01-21 05:14:34 +01:00
Akuli 02e19d6e2d tkinter: font size must be integer (#11295) 2024-01-21 02:10:29 +01:00
Karim Baidar cfb16543b8 Implement Preset Argument in tarfile.open Function and Add Test Coverage (#11251) 2024-01-15 16:39:31 +01:00
AN Long 5367bab4ed Add aware_datetime option to plistlib functions (#11276) 2024-01-15 12:35:43 +01:00
Marcell Perger 673c3c37fe Fix types for setuptools._distutils.ccompiler.CCompiler.compile (#11275) 2024-01-14 14:04:38 +01:00
Ali Hamdan ae9a68a86e All functions parameters in time module are positional-only (#11248) 2024-01-14 13:52:54 +01:00
Romain d'Esparbès db804846a4 Fix "state" type annotations for tkinter "Canvas.create_*" methods (#11257) 2024-01-08 18:53:18 +02:00
Alex Waygood ccc81f224d Bump various test dependencies (#11249) 2024-01-05 14:09:02 -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
Shantanu 2cafcc90a7 socket: rework to match docs more closely, improve accuracy on linux (#11219)
Match the documentation more closely

Fixes some of #8101
2024-01-04 14:36:31 -08:00
Sebastian Rittau 1b2cabce4d Remove macpath (removed in Python 3.8) (#11236) 2024-01-04 15:10:36 +01:00
Sebastian Rittau 262d73c90c Update description of _typeshed.Self (#11233) 2024-01-04 14:43:22 +01:00
Viicos 54447f63a4 Use type instead of Type in typing.pyi (#11235) 2024-01-04 05:04:43 -08:00
buermarc 56b0c8b42e Lib/bdb.py: add some missing optional str in return (#11231) 2024-01-04 13:17:07 +01:00
Shantanu 6fcd37456d Move ellipsis definition to types (#11223) 2024-01-02 16:14:53 -08:00
Matthieu Darbois 1d3c326518 base64: accept str for altchars and map01 in decode functions (#11210)
* `base64.b64decode`: `altchars` can be passed as an ASCII string to the `base64.b64decode` function.

* `base64.b32decode`: `map01` argument of `base64.b32decode` accepts `str | ReadableBuffer | None`.
2023-12-31 16:50:33 +02:00
Kewei Li 3edfd9037c Improve return types of os.wait3 and os.wait4 (#11194) 2023-12-28 18:09:38 +02:00
Jacob Walls 07d1d2a70c Add attributes to AST type_param classes (#11202) 2023-12-28 13:25:12 +01:00
Alex Waygood 16933b838e Bump mypy (and a few other test dependencies) (#11196) 2023-12-21 22:57:58 +00:00
Pavel Karateev c1137ee364 stdlib modules removed in Python 3.13 (PEP 594) (#11193) 2023-12-20 21:55:11 -08:00
Shantanu 1245faf0d5 Remove 2.7 from VERSIONS (#11185) 2023-12-20 14:31:22 +01:00
Avasam cf6bafbaf2 override http.HTTPMessage methods to only use str for the header type (#11114) 2023-12-19 08:37:57 +01:00
Stephen Morton ad51dde631 add unittest.case._AssertRaisesBaseContext class (#11158) 2023-12-18 23:07:47 +01:00
Stephen Morton f8e738621f add intermediate classes in selectors module (#11164) 2023-12-18 20:22:05 +01:00
Stephen Morton a53bfebb3f add zipfile._path (#11150) 2023-12-18 14:45:20 +01:00
Stephen Morton fd3228a2e2 threading.ThreadError and threading.local are aliases from _thread (#11167) 2023-12-18 14:13:08 +01:00
Ali Hamdan cdad9047d5 stdlib: Use Unpack for concurrent.futures.*Executor constructors (#11171) 2023-12-18 13:46:15 +01:00
Stephen Morton b6740d0bf4 use _compression.BaseStream for lzma.LZMAFile (#11166)
related to https://github.com/python/typeshed/issues/3968
2023-12-15 00:02:05 +00:00