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
Exception on node <ImportFrom l.2 at 0x7f1be7effbb0>in file '/tmp/plt/test.py'
Traceback (most recent call last):
File "/home/rublag/projects/ecom/server/.venv/bin/pylint", line 8, in<module>sys.exit(run_pylint())
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/__init__.py", line 24, in run_pylint
PylintRun(sys.argv[1:])
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/lint/run.py", line 384, in __init__
linter.check(args)
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 975, in check
self._check_files(
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1009, in _check_files
self._check_file(get_ast, check_astroid_module, name, filepath, modname)
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1035, in _check_file
check_astroid_module(ast_node)
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1172, in check_astroid_module
retval = self._check_astroid_module(
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1217, in _check_astroid_module
walker.walk(ast_node)
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 77, in walk
self.walk(child)
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 74, in walk
callback(astroid)
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/checkers/deprecated.py", line 112, in visit_importfrom
basename = get_import_name(node, basename)
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/pylint/checkers/utils.py", line 1552, in get_import_name
modname = root.relative_to_absolute_name(
File "/home/rublag/projects/ecom/server/.venv/lib/python3.9/site-packages/astroid/scoped_nodes.py", line 725, in relative_to_absolute_name
raise TooManyLevelsError(level=level, name=self.name)
astroid.exceptions.TooManyLevelsError: Relative import with too many levels (1) for module 'test'
Bug description
File test.py
It seems like this commit introduced the bug:
0f8212f#diff-7d982c7ee8d920542a08ef8e7a73fddf8929599d2c13507a7b3b6bf2a4371b6fR112
Command used
Pylint output
Expected behavior
No crash
Pylint version
The text was updated successfully, but these errors were encountered: