You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19-1
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,14 @@ foo(name="x", age=1) # Ok
33
33
foo(name=1) # Error
34
34
```
35
35
36
-
Refer to [PEP 692](https://peps.python.org/pep-0692/) for the details.
36
+
The definition of `foo` above is equivalent to the one below, with keyword-only arguments `name` and `age`:
37
+
38
+
```
39
+
def foo(*, name: str, age: int) -> None:
40
+
...
41
+
```
42
+
43
+
Refer to [PEP 692](https://peps.python.org/pep-0692/) for more information. Note that unlike in the current version of the PEP, mypy always treats signatures with `Unpack[SomeTypedDict]` as equivalent to their expanded forms with explicit keyword arguments, and there aren't special type checking rules for TypedDict arguments.
37
44
38
45
This was contributed by Ivan Levkivskyi back in 2022 ([PR 13471](https://github.com/python/mypy/pull/13471)).
39
46
@@ -45,6 +52,8 @@ TypeVarTuple was implemented by Jared Hance and Ivan Levkivskyi over several myp
45
52
46
53
Changes included in this release:
47
54
55
+
* Fix handling of tuple type context with unpacks (Ivan Levkivskyi, PR [16444](https://github.com/python/mypy/pull/16444))
56
+
* Handle TypeVarTuples when checking overload constraints (robjhornby, PR [16428](https://github.com/python/mypy/pull/16428))
48
57
* Enable Unpack/TypeVarTuple support (Ivan Levkivskyi, PR [16354](https://github.com/python/mypy/pull/16354))
This feature was contributed by Ivan Levkivskyi (PR [16237](https://github.com/python/mypy/pull/16237)).
98
107
108
+
#### More Precise Tuple Lenghts (Experimental)
109
+
110
+
Mypy supports experimental, more precise checking of tuple type lengths through `--enable-incomplete-feature=PreciseTupleTypes`. Refer to the [documentation](https://mypy.readthedocs.io/en/latest/command_line.html#enabling-incomplete-experimental-features) for more information.
111
+
112
+
More generally, we are planning to use `--enable-incomplete-feature` to introduce experimental features that would benefit from community feedback.
113
+
114
+
This feature was contributed by Ivan Levkivskyi (PR [16237](https://github.com/python/mypy/pull/16237)).
115
+
99
116
#### Mypy Changelog
100
117
101
118
We now maintain a [changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) in the mypy Git repository. It mirrors the contents of [mypy release blog posts](https://mypy-lang.blogspot.com/). We will continue to also publish release blog posts. In the future, release blog posts will be created based on the changelog near a release date.
@@ -175,6 +192,7 @@ This was contributed by Shantanu (PR [16280](https://github.com/python/mypy/pull
0 commit comments