1# For collections, the name of the type is capitalized, and the
2# name of the type inside the collection is in brackets
3x: List[int] = [1]
4x: Set[int] = {6, 7}
5
6# For simple built-in types, just use the name of the type
7x: int = 1
8x: float = 1.0
9x: bool = True
10x: str = "test"
11x: bytes = b"test"
1from custom_module import SomeClass
2from typing import Optional
3
4class SubClass:
5 a_reference: Optional[SomeClass] # Provides info that a_reference may be 'None'.
6
7 def __init__(self):
8 self.a_reference = None
9