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
I don't fully understand what triggers it but here's a traceback:
👉 Traceback 👈
"""
Traceback (most recent call last):
File "~/.pyenv/versions/3.9.0/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/lint/parallel.py", line 69, in _worker_check_single_file
_worker_linter.check_single_file(name, filepath, modname)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 895, in check_single_fileself._check_file(
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 936, in _check_file
check_astroid_module(ast_node)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1070, in check_astroid_module
retval =self._check_astroid_module(
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1115, in _check_astroid_module
walker.walk(ast_node)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 75, in walkself.walk(child)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 75, in walkself.walk(child)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 75, in walkself.walk(child)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 72, in walk
callback(astroid)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/checkers/base.py", line 1998, in visit_assignnameor utils.is_class_var(node)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/checkers/utils.py", line 1466, in is_class_varand node.parent.annotation.value.name =="ClassVar"AttributeError: 'Attribute' object has no attribute 'name'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "~/.pyenv/versions/3.9.0/lib/python3.9/runpy.py", line 197, in _run_module_as_mainreturn _run_code(code, main_globals, None,
File "~/.pyenv/versions/3.9.0/lib/python3.9/runpy.py", line 87, in _run_codeexec(code, run_globals)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/__main__.py", line 9, in <module>
pylint.run_pylint()
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/__init__.py", line 24, in run_pylint
PylintRun(sys.argv[1:])
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/lint/run.py", line 358, in __init__
linter.check(args)
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 880, in check
check_parallel(
File "~/src/github/sanitizers/octomachinery/.tox/pre-commit-ci/lib/python3.9/site-packages/pylint/lint/parallel.py", line 138, in check_parallelfor (
File "~/.pyenv/versions/3.9.0/lib/python3.9/multiprocessing/pool.py", line 870, in nextraise value
AttributeError: 'Attribute' object has no attribute 'name'
I've confirmed that downgrading to v2.7.2 does fix this problem.
Thanks for the report! I've opened #4266 to address it.
If you don't want to wait for the next release, you could try the this workaround. The error is raised by class variables that have a subscript annotation and use attribute access.
Steps to reproduce
I don't fully understand what triggers it but here's a traceback:
👉 Traceback 👈
I've confirmed that downgrading to v2.7.2 does fix this problem.
Current behavior
Log: https://github.com/sanitizers/octomachinery/runs/2222690514?check_suite_focus=true#step:7:91
Expected behavior
no traceback
env
pylint v2.7.3, executed via the pre-commit.com tool (which seems irrelevant, though)
Python 3.9 (locally) and 3.8 (in CI)
STR
(sorry, I don't have time to distil a small reproducer but this is better than nothing)
pip install tox
vim tox.ini
— bump pylint version to 2.7.3tox -e pre-commit -- pylint
— this should show the tracebackThe text was updated successfully, but these errors were encountered: