It crashes on every file, I pust just a little one as exmaple
When parsing the following a.py:
# -*- coding: utf-8 -*-
from sqlalchemy.orm import declarative_base
from sqlalchemy import Column, Integer, String
Base = declarative_base()
class Item(Base):
__tablename__ = "items"
id = Column(Integer, primary_key=True, index=True)
name = Column(String, index=True)
description = Column(String, index=True)
Command used
pylint a.py
Pylint output
pylint crashed with a ``AstroidError`` and with the following stacktrace:
```python
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\pylint\lint\pylinter.py", line 787, in _lint_file
check_astroid_module(module)
File "C:\Python311\Lib\site-packages\pylint\lint\pylinter.py", line 1016, in check_astroid_module
retval = self._check_astroid_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pylint\lint\pylinter.py", line 1068, in _check_astroid_module
walker.walk(node)
File "C:\Python311\Lib\site-packages\pylint\utils\ast_walker.py", line 94, in walk
self.walk(child)
File "C:\Python311\Lib\site-packages\pylint\utils\ast_walker.py", line 91, in walk
callback(astroid)
File "C:\Python311\Lib\site-packages\pylint_odoo\checkers\odoo_addons.py", line 1274, in visit_importfrom
self.check_odoo_relative_import(node)
File "C:\Python311\Lib\site-packages\pylint_odoo\checkers\odoo_addons.py", line 1523, in check_odoo_relative_import
manifest_path = misc.walk_up(node_dirpath, tuple(misc.MANIFEST_FILES), misc.top_path(node_dirpath))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pylint_odoo\misc.py", line 102, in walk_up
return walk_up(os.path.dirname(path), filenames, top)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pylint_odoo\misc.py", line 102, in walk_up
return walk_up(os.path.dirname(path), filenames, top)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pylint_odoo\misc.py", line 102, in walk_up
return walk_up(os.path.dirname(path), filenames, top)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 487 more times]
File "C:\Python311\Lib\site-packages\pylint_odoo\misc.py", line 99, in walk_up
path_filename = os.path.join(path, filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 120, in join
RecursionError: maximum recursion depth exceeded
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\pylint\lint\pylinter.py", line 751, in _lint_files
self._lint_file(fileitem, module, check_astroid_module)
File "C:\Python311\Lib\site-packages\pylint\lint\pylinter.py", line 789, in _lint_file
raise astroid.AstroidError from e
astroid.exceptions.AstroidError
```
It crashes on every file, I pust just a little one as exmaple When parsing the following
a.py
:Command used
Pylint output
pylint crashed with a ``AstroidError`` and with the following stacktrace:
```python Traceback (most recent call last): File "C:\Python311\Lib\site-packages\pylint\lint\pylinter.py", line 787, in _lint_file check_astroid_module(module) File "C:\Python311\Lib\site-packages\pylint\lint\pylinter.py", line 1016, in check_astroid_module retval = self._check_astroid_module( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pylint\lint\pylinter.py", line 1068, in _check_astroid_module walker.walk(node) File "C:\Python311\Lib\site-packages\pylint\utils\ast_walker.py", line 94, in walk self.walk(child) File "C:\Python311\Lib\site-packages\pylint\utils\ast_walker.py", line 91, in walk callback(astroid) File "C:\Python311\Lib\site-packages\pylint_odoo\checkers\odoo_addons.py", line 1274, in visit_importfrom self.check_odoo_relative_import(node) File "C:\Python311\Lib\site-packages\pylint_odoo\checkers\odoo_addons.py", line 1523, in check_odoo_relative_import manifest_path = misc.walk_up(node_dirpath, tuple(misc.MANIFEST_FILES), misc.top_path(node_dirpath)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pylint_odoo\misc.py", line 102, in walk_up return walk_up(os.path.dirname(path), filenames, top) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pylint_odoo\misc.py", line 102, in walk_up return walk_up(os.path.dirname(path), filenames, top) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pylint_odoo\misc.py", line 102, in walk_up return walk_up(os.path.dirname(path), filenames, top) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [Previous line repeated 487 more times] File "C:\Python311\Lib\site-packages\pylint_odoo\misc.py", line 99, in walk_up path_filename = os.path.join(path, filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Expected behavior
No crash.
Pylint version
OS / Environment
win32 (Windows)