Repository: wemake-services/wemake-python-styleguide

Issue:
AttributeError: 'Raise' object has no attribute 'value'
### What's wrong

```
Traceback (most recent call last):
  File "site-packages/wemake_python_styleguide/checker.py", line 154, in run
    visitor.run()
  File "site-packages/wemake_python_styleguide/visitors/base.py", line 191, in run
    self.visit(self.tree)
  File "site-packages/wemake_python_styleguide/visitors/base.py", line 186, in visit
    return route_visit(self, tree)
  File "site-packages/wemake_python_styleguide/compat/routing.py", line 36, in route_visit
    return getattr(
  File "/usr/local/lib/python3.9/ast.py", line 415, in generic_visit
    self.visit(item)
  File "site-packages/wemake_python_styleguide/visitors/base.py", line 186, in visit
    return route_visit(self, tree)
  File "site-packages/wemake_python_styleguide/compat/routing.py", line 36, in route_visit
    return getattr(
  File "/usr/local/lib/python3.9/ast.py", line 415, in generic_visit
    self.visit(item)
  File "site-packages/wemake_python_styleguide/visitors/base.py", line 186, in visit
    return route_visit(self, tree)
  File "site-packages/wemake_python_styleguide/compat/routing.py", line 36, in route_visit
    return getattr(
  File "site-packages/wemake_python_styleguide/visitors/ast/complexity/annotations.py", line 28, in visit_any_function
    self._check_function_annotations_complexity(node)
  File "site-packages/wemake_python_styleguide/visitors/ast/complexity/annotations.py", line 46, in _check_function_annotations_complexity
    self._check_annotations_complexity(node, annotations)
  File "site-packages/wemake_python_styleguide/visitors/ast/complexity/annotations.py", line 55, in _check_annotations_complexity
    complexity = get_annotation_complexity(annotation)
  File "site-packages/wemake_python_styleguide/logic/complexity/annotations.py", line 38, in get_annotation_complexity
    return 1 + get_annotation_complexity(get_slice_expr(annotation_node))
  File "site-packages/wemake_python_styleguide/logic/complexity/annotations.py", line 40, in get_annotation_complexity
    return max(
  File "site-packages/wemake_python_styleguide/logic/complexity/annotations.py", line 41, in <genexpr>
    (get_annotation_complexity(node) for node in annotation_node.elts),
  File "site-packages/wemake_python_styleguide/logic/complexity/annotations.py", line 31, in get_annotation_complexity
    annotation_node = ast.parse(  # type: ignore
AttributeError: 'Raise' object has no attribute 'value'
```

### How it should be

--

### Flake8 version and plugins

```json
{
  "dependencies": [],
  "platform": {
    "python_implementation": "CPython",
    "python_version": "3.9.0",
    "system": "Linux"
  },
  "plugins": [
    {
      "is_local": false,
      "plugin": "flake8-bandit",
      "version": "2.1.2"
    },
    {
      "is_local": false,
      "plugin": "flake8-broken-line",
      "version": "0.4.0"
    },
    {
      "is_local": false,
      "plugin": "flake8-bugbear",
      "version": "21.11.29"
    },
    {
      "is_local": false,
      "plugin": "flake8-comprehensions",
      "version": "3.8.0"
    },
    {
      "is_local": false,
      "plugin": "flake8-darglint",
      "version": "1.8.1"
    },
    {
      "is_local": false,
      "plugin": "flake8-debugger",
      "version": "4.0.0"
    },
    {
      "is_local": false,
      "plugin": "flake8-docstrings",
      "version": "1.6.0, pydocstyle: 6.1.1"
    },
    {
      "is_local": false,
      "plugin": "flake8-eradicate",
      "version": "1.2.0"
    },
    {
      "is_local": false,
      "plugin": "flake8-string-format",
      "version": "0.3.0"
    },
    {
      "is_local": false,
      "plugin": "flake8_commas",
      "version": "2.1.0"
    },
    {
      "is_local": false,
      "plugin": "flake8_isort",
      "version": "4.1.1"
    },
    {
      "is_local": false,
      "plugin": "flake8_quotes",
      "version": "3.3.1"
    },
    {
      "is_local": false,
      "plugin": "mccabe",
      "version": "0.6.1"
    },
    {
      "is_local": false,
      "plugin": "naming",
      "version": "0.12.1"
    },
    {
      "is_local": false,
      "plugin": "pycodestyle",
      "version": "2.8.0"
    },
    {
      "is_local": false,
      "plugin": "pyflakes",
      "version": "2.4.0"
    },
    {
      "is_local": false,
      "plugin": "rst-docstrings",
      "version": "0.2.5"
    },
    {
      "is_local": false,
      "plugin": "wemake_python_styleguide",
      "version": "0.16.0"
    }
  ],
  "version": "4.0.1"
}
```

### pip information

```
astor==0.8.1
attrs==21.4.0
bandit==1.7.2
darglint==1.8.1
docutils==0.18.1
eradicate==2.0.0
flake8==4.0.1
flake8-bandit==2.1.2
flake8-broken-line==0.4.0
flake8-bugbear==21.11.29
flake8-codes==0.2.0
flake8-commas==2.1.0
flake8-comprehensions==3.8.0
flake8-debugger==4.0.0
flake8-docstrings==1.6.0
flake8-eradicate==1.2.0
flake8-isort==4.1.1
flake8-polyfill==1.0.2
flake8-quotes==3.3.1
flake8-rst-docstrings==0.2.5
flake8-string-format==0.3.0
GitPython==3.1.26
isort==5.10.1
mccabe==0.6.1
pbr==5.8.0
pep8-naming==0.12.1
pycodestyle==2.8.0
pydocstyle==6.1.1
pyflakes==2.4.0
Pygments==2.11.2
PyYAML==6.0
restructuredtext-lint==1.3.2
six==1.16.0
smmap==5.0.0
snowballstemmer==2.2.0
stevedore==3.5.0
testfixtures==6.18.3
typing_extensions==4.0.1
unify==0.5
untokenize==0.1.1
urllib3==1.26.8
wemake-python-styleguide==0.16.0
```

### OS information

Linux rock 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux


Discussion:
@orsinium can you please also show a code sample to reproduce this? 🤔 
I'll try. I was running it on the whole site-packages by accident when it happened, it's something there 👀 
Here you go:
https://github.com/pypa/pip/blob/main/src/pip/_internal/utils/subprocess.py
Thanks! 


Resolving patch:
diff --git a/wemake_python_styleguide/logic/complexity/annotations.py b/wemake_python_styleguide/logic/complexity/annotations.py
--- a/wemake_python_styleguide/logic/complexity/annotations.py
+++ b/wemake_python_styleguide/logic/complexity/annotations.py
@@ -31,7 +31,7 @@ def get_annotation_complexity(annotation_node: _Annotation) -> int:
             annotation_node = ast.parse(  # type: ignore
                 annotation_node.s,
             ).body[0].value
-        except (SyntaxError, IndexError):
+        except Exception:
             return 1
 
     if isinstance(annotation_node, ast.Subscript):


Test patch:
diff --git a/tests/test_logic/test_complexity/test_annotations_complexity.py b/tests/test_logic/test_complexity/test_annotations_complexity.py
--- a/tests/test_logic/test_complexity/test_annotations_complexity.py
+++ b/tests/test_logic/test_complexity/test_annotations_complexity.py
@@ -16,6 +16,9 @@
     ('Literal[""]', 2),
     ('Tuple[()]', 2),
 
+    # Literals with strings:
+    ('Literal["regular", "raise", "is"]', 2),
+
     # invalid annotations
     ('"This is rainbow in the dark!"', 1),