from typing import Union
import ast
from typing import List


def get_assign_targets(node: Union[ast.Assign, ast.AnnAssign]) -> List[ast.expr]:
    """
    An AnnAssign `target` is a single node.
    An Assign `targets` is a list of nodes.

    Example:
        `a = b = 1` return [ast.Name('a'), ast.Name('b')]
        `a, b = c` return [ast.Tuple(('a', 'b'))]
    """
    if isinstance(node, ast.Assign):
        return node.targets
    else:
        return [node.target]