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

self._tokens[1]: IndexError: list index out of range #2899

Closed
sobolevn opened this issue Mar 26, 2024 · 0 comments · Fixed by #2900
Closed

self._tokens[1]: IndexError: list index out of range #2899

sobolevn opened this issue Mar 26, 2024 · 0 comments · Fixed by #2900

Comments

@sobolevn
Copy link
Member

https://github.com/dry-python/returns/actions/runs/8437642376/job/23107904196?pr=1810


Run poetry run flake8 .
Traceback (most recent call last):
  File "/home/runner/work/returns/returns/.venv/lib/python3.11/site-packages/wemake_python_styleguide/checker.py", line 154, in run
    visitor.run()
  File "/home/runner/work/returns/returns/.venv/lib/python3.11/site-packages/wemake_python_styleguide/visitors/base.py", line 286, in run
    self.visit(token)
  File "/home/runner/work/returns/returns/.venv/lib/python3.11/site-packages/wemake_python_styleguide/visitors/ast/function_empty_lines.py", line 150, in visit
    ).analyze()
      ^^^^^^^^^
  File "/home/runner/work/returns/returns/.venv/lib/python3.11/site-packages/wemake_python_styleguide/visitors/ast/function_empty_lines.py", line 114, in analyze
    function.name_token(),
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/returns/returns/.venv/lib/python3.11/site-packages/wemake_python_styleguide/visitors/ast/function_empty_lines.py", line 18, in name_token
    return self._tokens[1]
           ~~~~~~~~~~~~^^^
IndexError: list index out of range
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

Successfully merging a pull request may close this issue.

1 participant