mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
bpo-45166: fixes get_type_hints
failure on Final
(GH-28279)
Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
This commit is contained in:
parent
4c0fc65cd8
commit
784905dbef
5 changed files with 56 additions and 10 deletions
10
Lib/test/ann_module5.py
Normal file
10
Lib/test/ann_module5.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Used by test_typing to verify that Final wrapped in ForwardRef works.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Final
|
||||
|
||||
name: Final[str] = "final"
|
||||
|
||||
class MyClass:
|
||||
value: Final = 3000
|
Loading…
Add table
Add a link
Reference in a new issue