diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2024-04-19 13:03:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 13:03:44 (GMT) |
commit | 1e3e7ce11e3b0fc76e981db85d27019d6d210bbc (patch) | |
tree | c9b6e5ad1054a6eef89050027202d71f58497d08 /Lib/test/typinganndata | |
parent | 15b3555e4a47ec925c965778a415dc11f0f981fd (diff) | |
download | cpython-1e3e7ce11e3b0fc76e981db85d27019d6d210bbc.zip cpython-1e3e7ce11e3b0fc76e981db85d27019d6d210bbc.tar.gz cpython-1e3e7ce11e3b0fc76e981db85d27019d6d210bbc.tar.bz2 |
gh-114053: Fix bad interaction of PEP-695, PEP-563 and ``get_type_hints`` (#118009)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib/test/typinganndata')
-rw-r--r-- | Lib/test/typinganndata/ann_module695.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Lib/test/typinganndata/ann_module695.py b/Lib/test/typinganndata/ann_module695.py new file mode 100644 index 0000000..2ede9fe --- /dev/null +++ b/Lib/test/typinganndata/ann_module695.py @@ -0,0 +1,22 @@ +from __future__ import annotations +from typing import Callable + + +class A[T, *Ts, **P]: + x: T + y: tuple[*Ts] + z: Callable[P, str] + + +class B[T, *Ts, **P]: + T = int + Ts = str + P = bytes + x: T + y: Ts + z: P + + +def generic_function[T, *Ts, **P]( + x: T, *y: *Ts, z: P.args, zz: P.kwargs +) -> None: ... |