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
# Begin rules taken from: https://typing.python.org/en/latest/spec/annotations.html#grammar-token-expression-grammar-type_expression
709
+
# <Any>
710
+
typx = Any
711
+
class SelfBinder:
712
+
def bind_self(self) -> Self:
713
+
typx: TypeForm
714
+
# <Self> (valid only in some contexts)
715
+
typx = Self
716
+
return self
717
+
# <LiteralString>
718
+
typx = LiteralString
719
+
# <NoReturn>
720
+
typx = NoReturn
721
+
# <Never>
722
+
typx = Never
723
+
# <None>
724
+
typx = None
725
+
# name (where name must refer to a valid in-scope class)
726
+
typx = SomeClass
727
+
# name (where name must refer to a valid in-scope type alias)
728
+
typx = SomeTypeAlias
729
+
# name (where name must refer to a valid in-scope TypeVar)
730
+
# NOTE: Unbound TypeVar isn't currently accepted as a TypeForm. Is that OK?
731
+
typx = SomeTypeVar # E: Incompatible types in assignment (expression has type "TypeVar", variable has type "TypeForm[Any]")
732
+
# name '[' type_expression (',' type_expression)* ']'
733
+
typx = Dict[str, int]
734
+
# (TODO: Add: name '[' unpacked ']')
735
+
# (TODO: Add: name '[' type_expression_list (',' type_expression_list)* ']')
736
+
# name '[' '(' ')' ']' (denoting specialization with an empty TypeVarTuple)
0 commit comments