Open
Description
Bug description
when running pylint on a file path with different capitalization (which is allowed because file paths in windows are case-insensitive), these recursion errors are printed, sometimes infinitely.
i was able to narrow it down to this minimal example where the error is only printed once, but in my codebase it seems to print these errors infinitely, causing a memory leak in the pylint vscode extension (microsoft/vscode-pylint#583) i assume because it's storing the infinite output in memory while it waits for pylint to finish running, which it never does.
# ./tests/sandpit/__init__.py
from tests.sandpit import foo
def asdf():
return foo.abc()
def fdsa(bar):
lambda item: item(bar.title())
# ./tests/sandpit/bar.py
def abc(): ...
Command used
error
pylint tests\sandpit\__Init__.py
no error
pylint tests\sandpit\__init__.py
Pylint output
> pylint tests\sandpit\__Init__.py
C:\Users\user\project\.venv\Lib\site-packages\astroid\transforms.py:118: UserWarning: Astroid was unable to transform Expr(value=<Lambda.<lambda> l.9 at 0x1f740428730>).
Some functionality will be missing unless the system recursion limit is lifted.
From pylint, try: --init-hook='import sys; sys.setrecursionlimit(2000)' or higher.
warnings.warn(
Expected behavior
no error
Pylint version
pylint 3.3.2
astroid 3.3.5
Python 3.13.0 (main, Oct 16 2024, 00:33:24) [MSC v.1929 64 bit (AMD64)]
OS / Environment
windows 11