According to PEP-0526, you should annotate the types first, then do the unpacking
a: int
b: int
a, b = t
More Related Contents:
- How do I type hint a method with the type of the enclosing class?
- What are variable annotations?
- How to specify multiple return types using type-hints
- How can I specify the function type in my type hints?
- Type hinting a collection of a specified type
- What are type hints in Python 3.5?
- Using the class as a type hint for arguments in its methods [duplicate]
- Type hint for a function that returns only a specific set of values
- How to use type hints in python 3.6?
- How to specify “nullable” return type with type hints
- How should I use the Optional type hint?
- Exclude type in Python typing annotation
- Python type hinting with exceptions
- Type hinting / annotation (PEP 484) for numpy.ndarray
- Can I omit Optional if I set default to None?
- Name not defined in type annotation [duplicate]
- Python 3.5 type hinting does not result in an error
- Type annotations for Enum attribute
- How to annotate function that takes a tuple of variable length? (variadic tuple type annotation)
- Recursive Typing in Python 3.5+ [duplicate]
- What is the type hint for a (any) python module?
- Validating detailed types in python dataclasses
- Subclass in type hinting
- How do I add default parameters to functions when using type hinting?
- Difference between defining typing.Dict and dict?
- Type hinting in Python 2
- Type hints with user defined classes
- How to annotate types of multiple return values?
- How do I annotate types in a for-loop?
- Type hints in namedtuple