Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails with AttributeError: 'Slice' object has no attribute 'value' #5

Closed
Melevir opened this issue Dec 7, 2019 · 1 comment
Closed

Comments

@Melevir
Copy link
Contributor

Melevir commented Dec 7, 2019

  File "/Users/ilebedev/.virtualenvs/amy/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8_annotations_complexity/checker.py", line 23, in run
    too_difficult_annotations = validate_annotations_in_ast_node(
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8_annotations_complexity/ast_helpres.py", line 28, in validate_annotations_in_ast_node
    complexity = get_annotation_compexity(annotation)
  File "/Users/ilebedev/.virtualenvs/amy/lib/python3.8/site-packages/flake8_annotations_complexity/ast_helpres.py", line 9, in get_annotation_compexity
    return 1 + get_annotation_compexity(annotation_node.slice.value)  # type: ignore
AttributeError: 'Slice' object has no attribute 'value'

Code:


PROJECTS_INFO: Final[List[Tuple[int, str, str, str]]] = [
]
@Melevir
Copy link
Contributor Author

Melevir commented Dec 7, 2019

Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant