MCPcopy Index your code
hub / github.com/RustPython/RustPython / TypeAlias

Function TypeAlias

Lib/typing.py:785–798  ·  view source on GitHub ↗

Special form for marking type aliases. Use TypeAlias to indicate that an assignment should be recognized as a proper type alias definition by type checkers. For example:: Predicate: TypeAlias = Callable[..., bool] It's invalid when used anywhere except as in the examp

(self, parameters)

Source from the content-addressed store, hash-verified

783
784@_SpecialForm
785def TypeAlias(self, parameters):
786 """Special form for marking type aliases.
787
788 Use TypeAlias to indicate that an assignment should
789 be recognized as a proper type alias definition by type
790 checkers.
791
792 For example::
793
794 Predicate: TypeAlias = Callable[..., bool]
795
796 It's invalid when used anywhere except as in the example above.
797 """
798 raise TypeError(f"{self} is not subscriptable")
799
800
801@_SpecialForm

Callers 2

ast_from_objectMethod · 0.85

Calls

no outgoing calls

Tested by 1