Skip to content

Adding from-stdin = false to toml config causes pylint to hang #966

@GrimzEcho

Description

@GrimzEcho

Overview

At the end of the docs on configuration (main section - https://pylint.readthedocs.io/en/latest/user_guide/configuration/all-options.html#main-checker), there is an example configuration section with the following code:

[tool.pylint.main]
analyse-fallback-blocks = false

clear-cache-post-run = false

# ...

from-stdin = false

ignore = ["CVS"]

# ...

If you use this configuration inside of a .toml file, then run pylint on a file, the process will hang indefinitely, with no output. The issue was traced back to the from-stdin setting.

Steps to reproduce

  1. Create a Python project/directory
  2. Create a pyproject.toml file with the following content:
[tool.pylint.main]
from-stdin = false
  1. Create a python file (test.py) with some basic Python code
  2. From the project root, run pylint ./test.py
  3. Note that Pylint hangs
  4. Comment out or remove the from-stdin = false line.
  5. Rerun pylint ./test.py
  6. Notice that it runs successfully

Details

pylint 2.17.0
astroid 2.15.0
Python 3.7.3 (default, Oct 31 2022, 14:04:00) 
[GCC 8.3.0]

Linux - Debian 10

virtualenv 20.16.4 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions