1
0
forked from VimPlug/jedi

Implement Final[...] in a way so it doesn't completely fail

This commit is contained in:
Dave Halter
2026-04-28 15:49:21 +02:00
parent b27a7dde18
commit 6473ddc28c
2 changed files with 16 additions and 3 deletions
+13 -1
View File
@@ -3,7 +3,7 @@ Test the typing library, with docstrings and annotations
"""
import typing
from typing import Sequence, MutableSequence, List, Iterable, Iterator, \
AbstractSet, Tuple, Mapping, Dict, Union, Optional
AbstractSet, Tuple, Mapping, Dict, Union, Optional, Final
class B:
pass
@@ -555,3 +555,15 @@ def typed_dict_test_foo(arg: Bar):
arg['an_int']
#? int()
arg['another_variable']
# -------------------------
# Final
# -------------------------
x: Final[str] = 1
y: Final = 1
#? str()
x
# TODO
#?
y