Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pylint only catching cyclic-import in parallel mode #10140

Open
purajit opened this issue Dec 14, 2024 · 0 comments
Open

pylint only catching cyclic-import in parallel mode #10140

purajit opened this issue Dec 14, 2024 · 0 comments
Labels
Bug 🪲 False Negative 🦋 No message is emitted but something is wrong with the code multiprocessing Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning

Comments

@purajit
Copy link
Contributor

purajit commented Dec 14, 2024

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.

@purajit purajit added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Dec 14, 2024
@Pierre-Sassoulas Pierre-Sassoulas added Bug 🪲 Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning False Negative 🦋 No message is emitted but something is wrong with the code multiprocessing and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Dec 15, 2024
@jacobtylerwalls jacobtylerwalls changed the title pylint only catching cylic-import in parallel mode pylint only catching cyclic-import in parallel mode Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 False Negative 🦋 No message is emitted but something is wrong with the code multiprocessing Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning
Projects
None yet
Development

No branches or pull requests

2 participants