# Buggy code
def _is_valid_final_value(self, format_value: ast.AST) -> bool:
    # Variable lookup is okay and a single attribute is okay
    if isinstance(format_value, (ast.Name, ast.Attribute)):
        return True
    # Function call with empty arguments is okay
    elif isinstance(format_value, ast.Call) and not format_value.args:
        return True
    # Named lookup, Index lookup & Dict key is okay
    elif isinstance(format_value, ast.Subscript):
        if isinstance(format_value.slice, ast.Index):
            return isinstance(
                format_value.slice.value,
                self._valid_format_index,
            )
    return False


# 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 _is_valid_final_value(self, format_value: ast.AST) -> bool:
    # Variable lookup is okay and a single attribute is okay
    if isinstance(format_value, (ast.Name, ast.Attribute)):
        return True
    # Function call with empty arguments is okay
    elif isinstance(format_value, ast.Call) and not format_value.args:
        return True
    # Named lookup, Index lookup & Dict key is okay
    elif isinstance(format_value, ast.Subscript):
        return isinstance(
            get_slice_expr(format_value),
            self._valid_format_index,
        )
    return False