You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An exception is thrown if running flake8 and it finds an empty string in a Literal definition.
To Reproduce
I wrote the test for it, so see that: #11
Output:
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/flake8", line 8, in <module>
sys.exit(main())
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8/main/cli.py", line 22, in main
app.run(argv)
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8/main/application.py", line 360, in run
self._run(argv)
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8/main/application.py", line 348, in _run
self.run_checks()
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8/main/application.py", line 262, in run_checks
self.file_checker_manager.run()
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8/checker.py", line 334, in run
self.run_serial()
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8/checker.py", line 318, in run_serial
checker.run_checks()
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8/checker.py", line 598, in run_checks
self.run_ast_checks()
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8/checker.py", line 505, in run_ast_checks
for (line_number, offset, text, _) in runner:
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8_annotations_complexity/checker.py", line 23, in run
too_difficult_annotations = validate_annotations_in_ast_node(
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8_annotations_complexity/ast_helpres.py", line 31, in validate_annotations_in_ast_node
complexity = get_annotation_complexity(annotation)
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8_annotations_complexity/ast_helpres.py", line 12, in get_annotation_complexity
return 1 + get_annotation_complexity(annotation_node.slice.value) # type: ignore
File "/home/ubuntu/.local/lib/python3.8/site-packages/flake8_annotations_complexity/ast_helpres.py", line 8, in get_annotation_complexity
annotation_node = ast.parse(annotation_node.s).body[0].value # type: ignore
IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
An exception is thrown if running flake8 and it finds an empty string in a Literal definition.
To Reproduce
I wrote the test for it, so see that:
#11
Output:
The text was updated successfully, but these errors were encountered: