(node)
return format_annotation(annotation_node)
Get the type annotation of the assignment of the given node.

    :param node: The node to get the annotation for.
    :type node: astroid.nodes.Assign or astroid.nodes.AnnAssign

    :returns: The type annotation as a string, or None if one does not exist.
    :rtype: str or None
Get the type annotation of the assignment of the given node.
Get the type annotation of the assignment of the given node .
def get_assign_annotation(node):
    """Get the type annotation of the assignment of the given node.

    :param node: The node to get the annotation for.
    :type node: astroid.nodes.Assign or astroid.nodes.AnnAssign

    :returns: The type annotation as a string, or None if one does not exist.
    :rtype: str or None
    """
    annotation_node = None
    try:
        annotation_node = node.annotation
    except AttributeError:
        annotation_node = node.type_annotation

    return format_annotation(annotation_node)
def get_assign_annotation ( node ) : annotation_node = None try : annotation_node = node . annotation except AttributeError : annotation_node = node . type_annotation return format_annotation ( annotation_node )