Home
last modified time | relevance | path

Searched refs:ClassVar (Results 1 - 12 of 12) sorted by relevance

/third_party/python/Lib/test/
H A Ddataclass_module_2_str.py8 from typing import ClassVar namespace
10 T_CV2 = ClassVar[int]
11 T_CV3 = ClassVar
18 T_CV4 = ClassVar
19 cv0: ClassVar[int] = 20
20 cv1: ClassVar = 30
23 not_cv4: T_CV4 # When using string annotations, this field is not recognized as a ClassVar.
H A Ddataclass_module_2.py8 from typing import ClassVar namespace
10 T_CV2 = ClassVar[int]
11 T_CV3 = ClassVar
18 T_CV4 = ClassVar
19 cv0: ClassVar[int] = 20
20 cv1: ClassVar = 30
23 not_cv4: T_CV4 # When using string annotations, this field is not recognized as a ClassVar.
H A Ddataclass_module_1_str.py10 T_CV2 = typing.ClassVar[int]
11 T_CV3 = typing.ClassVar
18 T_CV4 = typing.ClassVar
19 cv0: typing.ClassVar[int] = 20
20 cv1: typing.ClassVar = 30
23 not_cv4: T_CV4 # When using string annotations, this field is not recognized as a ClassVar.
H A Ddataclass_module_1.py10 T_CV2 = typing.ClassVar[int]
11 T_CV3 = typing.ClassVar
18 T_CV4 = typing.ClassVar
19 cv0: typing.ClassVar[int] = 20
20 cv1: typing.ClassVar = 30
23 not_cv4: T_CV4 # When using string annotations, this field is not recognized as a ClassVar.
H A Dann_module6.py1 # Tests that top-level ClassVar is not allowed
5 from typing import ClassVar namespace
7 wrong: ClassVar[int] = 1
H A Dann_module2.py6 from typing import no_type_check, ClassVar namespace
34 var: ClassVar['CV']
H A Dtest_typing.py22 from typing import Generic, ClassVar, Final, final, Protocol namespace
156 bottom_type: ClassVar[Any]
300 alias_3 = ClassVar[Self]
355 alias_3 = ClassVar[LiteralString]
501 Final, Final[int], ClassVar, ClassVar[int],
1772 self.assertNotEqual(ClassVar, Union)
3807 ClassVar[ClassVar[int]]
3809 List[ClassVar[in
[all...]
H A Dtest_dataclasses.py17 from typing import ClassVar, Any, List, Union, Tuple, Dict, Generic, TypeVar, Optional, Protocol namespace
22 import typing # Needed for the string "typing.ClassVar[int]" to work as an annotation.
724 # Because this is a ClassVar, it can be mutable.
727 z: ClassVar[typ] = typ()
729 # Because this is a ClassVar, it can be mutable.
732 x: ClassVar[typ] = Subclass()
1113 z: ClassVar[int] = 1000
1114 w: ClassVar[int] = 2000
1115 t: ClassVar[int] = 3000
1116 s: ClassVar
[all...]
/third_party/python/Tools/peg_generator/pegen/
H A Dparser.py8 from typing import Any, Callable, ClassVar, Dict, Optional, Tuple, Type, TypeVar, cast namespace
162 KEYWORDS: ClassVar[Tuple[str, ...]]
164 SOFT_KEYWORDS: ClassVar[Tuple[str, ...]]
/third_party/python/Lib/
H A Ddataclasses.py221 # String regex that string annotations for ClassVar or InitVar must match.
648 # test if this is a ClassVar.
649 return (a_type is typing.ClassVar
651 and a_type.__origin__ is typing.ClassVar))
667 # ClassVar, then a_module is typing, and a_type is
668 # typing.ClassVar.
685 # With string annotations, cv0 will be detected as a ClassVar:
686 # CV = ClassVar
691 # But in this example cv1 will not be detected as a ClassVar:
694 # CV = ClassVar
[all...]
H A Dtyping.py11 NoReturn, Never, ClassVar, Self, Concatenate, Unpack, and others.
48 'ClassVar',
182 invalid_generic_forms += (ClassVar,)
192 if allow_special_forms and arg in (ClassVar, Final):
612 def ClassVar(self, parameters): function
615 An annotation wrapped in ClassVar indicates that a given
620 stats: ClassVar[Dict[str, int]] = {} # class variable
623 ClassVar accepts only types and cannot be further subscribed.
625 Note that ClassVar is not a class itself, and should not
1340 # * Parameterized `Final`, `ClassVar` an
[all...]
/third_party/jinja2/
H A Dext.py73 identifier: t.ClassVar[str]

Completed in 25 milliseconds