# Buggy code
def get_annotation_compexity(annotation_node: _Annotation) -> int:
    """
    Recursevly counts complexity of annotation nodes.

    When annotations are written as strings,
    we additionally parse them to ``ast`` nodes.
    """
    if isinstance(annotation_node, ast.Str):
        # try to parse string-wrapped annotations
        try:
            annotation_node = (
                ast.parse(  # type: ignore
                    annotation_node.s,
                )
                .body[0]
                .value
            )
        except (SyntaxError, IndexError):
            return 1

    if isinstance(annotation_node, ast.Subscript):
        return 1 + get_annotation_compexity(
            annotation_node.slice.value,  # type: ignore
        )
    elif isinstance(annotation_node, (ast.Tuple, ast.List)):
        return max(
            (get_annotation_compexity(node) for node in annotation_node.elts),
            default=1,
        )
    return 1


# Traceback (AttributeError)
/Users/DBoger/PycharmProjects/project/.venv/bin/python -m flake8 project
Traceback (most recent call last):
File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/checker.py", line 154, in run
visitor.run()
File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/visitors/base.py", line 191, in run
self.visit(self.tree)
File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/visitors/base.py", line 186, in visit
return route_visit(self, tree)
File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/compat/routing.py", line 36, in route_visit
return getattr(
File "/Users/DBoger/.pyenv/versions/3.9.0b5/lib/python3.9/ast.py", line 408, in generic_visit
self.visit(item)
File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/visitors/base.py", line 186, in visit
return route_visit(self, tree)
File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/compat/routing.py", line 36, in route_visit
return getattr(
File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/visitors/ast/complexity/annotations.py", line 34, in visit_any_function
self._check_function_annotations_complexity(node)
File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/visitors/ast/complexity/annotations.py", line 58, in _check_function_annotations_complexity
self._check_annotations_complexity(node, annotations)
File "/Users/DBoger/PycharmProjects/sellerly-profile/.venv/lib/python3.9/site-packages/wemake_python_styleguide/visitors/ast/complexity/annotations.py", line 67, in _check_annotations_complexity
complexity = get_annotation_compexity(annotation)
File "/Users/DBoger/PycharmProjects/sellerly-profile/.venv/lib/python3.9/site-packages/wemake_python_styleguide/logic/complexity/annotations.py", line 36, in get_annotation_compexity
annotation_node.slice.value,  # type: ignore
AttributeError: 'Tuple' object has no attribute 'value'

# Fixed code
def get_annotation_compexity(annotation_node: _Annotation) -> int:
    """
    Recursevly counts complexity of annotation nodes.

    When annotations are written as strings,
    we additionally parse them to ``ast`` nodes.
    """
    if isinstance(annotation_node, ast.Str):
        # try to parse string-wrapped annotations
        try:
            annotation_node = (
                ast.parse(  # type: ignore
                    annotation_node.s,
                )
                .body[0]
                .value
            )
        except (SyntaxError, IndexError):
            return 1

    if isinstance(annotation_node, ast.Subscript):
        return 1 + get_annotation_compexity(get_slice_expr(annotation_node))
    elif isinstance(annotation_node, (ast.Tuple, ast.List)):
        return max(
            (get_annotation_compexity(node) for node in annotation_node.elts),
            default=1,
        )
    return 1