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
Starting with version 8.3.4 (or 8.3.5), pylama throws an IndexError when an empty Python file is present in the repository.
Traceback (most recent call last):
File "/root/.local/share/virtualenvs/testrepo-a7DjncKn/bin/pylama", line 8, in <module>
sys.exit(shell())
File "/root/.local/share/virtualenvs/testrepo-a7DjncKn/lib/python3.7/site-packages/pylama/main.py", line 119, in shell
rootdir=CURDIR,
File "/root/.local/share/virtualenvs/testrepo-a7DjncKn/lib/python3.7/site-packages/pylama/main.py", line 68, in check_paths
errors += run(path=path, code=code, rootdir=rootdir, options=options)
File "/root/.local/share/virtualenvs/testrepo-a7DjncKn/lib/python3.7/site-packages/pylama/core.py", line 41, in run
ctx.push(source=lname, **err_info)
File "/root/.local/share/virtualenvs/testrepo-a7DjncKn/lib/python3.7/site-packages/pylama/context.py", line 107, in __exit__
self.push(lnum=1, col=1, text=str(evalue))
File "/root/.local/share/virtualenvs/testrepo-a7DjncKn/lib/python3.7/site-packages/pylama/context.py", line 184, in push
if SKIP_PATTERN(self.lines[err.lnum - 1]):
IndexError: list index out of range
This can be easily reproduced by creating an empty repository, putting an empty test.py file into it, and adding the following pylama.ini:
[pylama]linters = pydocstyle
The text was updated successfully, but these errors were encountered:
Starting with version 8.3.4 (or 8.3.5), pylama throws an IndexError when an empty Python file is present in the repository.
This can be easily reproduced by creating an empty repository, putting an empty
test.py
file into it, and adding the followingpylama.ini
:The text was updated successfully, but these errors were encountered: