Skip to content

Pylint 2.10.0 incorrectly assumes that $HOME/.cache/pylint exists #4883

@jfly

Description

@jfly

Bug description

I'm trying out Pylint 2.10.0, and seeing a crash (described below).

Configuration

No response

Command used

pylint a.py

Pylint output

PYLINTHOME is now '/home/jeremy/.cache/pylint' but obsolescent '/home/jeremy/.pylint.d' is found; you can safely remove the latter
Traceback (most recent call last):
  File "/home/jeremy/.local/share/virtualenvs/timelines-backend-2BUOoOOv/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
  File "/home/jeremy/.local/share/virtualenvs/timelines-backend-2BUOoOOv/lib/python3.8/site-packages/pylint/__init__.py", line 21, in run_pylint
    from pylint.lint import Run as PylintRun
  File "/home/jeremy/.local/share/virtualenvs/timelines-backend-2BUOoOOv/lib/python3.8/site-packages/pylint/lint/__init__.py", line 76, in <module>
    from pylint.lint.parallel import check_parallel
  File "/home/jeremy/.local/share/virtualenvs/timelines-backend-2BUOoOOv/lib/python3.8/site-packages/pylint/lint/parallel.py", line 8, in <module>
    from pylint.lint.utils import _patch_sys_path
  File "/home/jeremy/.local/share/virtualenvs/timelines-backend-2BUOoOOv/lib/python3.8/site-packages/pylint/lint/utils.py", line 11, in <module>
    from pylint.config import PYLINT_HOME
  File "/home/jeremy/.local/share/virtualenvs/timelines-backend-2BUOoOOv/lib/python3.8/site-packages/pylint/config/__init__.py", line 89, in <module>
    for filename in os.listdir(PYLINT_HOME):
FileNotFoundError: [Errno 2] No such file or directory: '/home/jeremy/.cache/pylint'

Expected behavior

I would not expect Pylint to crash. I'd expect it to create this ~/.cache/pylint directory as needed.

I believe this was broken in #4661

Pylint version

$ mkdir /home/jeremy/.cache/pylint && pylint --version
PYLINTHOME is now '/home/jeremy/.cache/pylint' but obsolescent '/home/jeremy/.pylint.d' is found; you can safely remove the latter
pylint 2.10.0
astroid 2.7.2
Python 3.8.10 (default, Aug 20 2021, 16:16:35)
[GCC 11.1.0]

OS / Environment

Arch Linux

Additional dependencies

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions