Skip to content

pylint only catching cyclic-import in parallel mode #10140

Open
@purajit

Description

@purajit

Bug description

With the following file system and no explicit pylint configuration:

# a.py
from .b import *

# b.py
from .c import *

# c.py
from .a import *

Running pylint:

$ PYTHONPATH=. pylint --score=no --disable=C0114,W0614,W0401 -j0 .
************* Module b
b.py:1:0: R0401: Cyclic import (a -> b -> c) (cyclic-import)

$ PYTHONPATH=. pylint --score=no --disable=C0114,W0614,W0401 -j1 .

$ PYTHONPATH=. pylint --score=no --disable=C0114,W0614,W0401 -j2 .
************* Module b
b.py:1:0: R0401: Cyclic import (a -> b -> c) (cyclic-import)

Potentially related issues:
#9168

Configuration

None

Expected behavior

Would expect all three to give the same output; worst-case scenario, I expect -j1 to
catch all issues, while running with parallelism may miss a few.

Pylint version

pylint 3.3.2
astroid 3.3.6
Python 3.13.0 (main, Oct 16 2024, 08:05:40) [Clang 18.1.8 ]

# however, this issue persists across a large variety of pylint and Python version combinations

OS / Environment

Apple Silicon
MacOS 15.1.1

Same results on an Ubuntu container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions