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

consider-using-augmented-assign doesn't work with --jobs > 1 #10037

Open
Redoubts opened this issue Oct 20, 2024 · 1 comment
Open

consider-using-augmented-assign doesn't work with --jobs > 1 #10037

Redoubts opened this issue Oct 20, 2024 · 1 comment
Labels
Bug 🪲 multiprocessing Needs PR This issue is accepted, sufficiently specified and now needs an implementation

Comments

@Redoubts
Copy link

Bug description

Suppose I create 2 files with the same content:

from pathlib import Path

A = Path(".")

A = A / "test"

If I run pylint --load-plugins pylint.extensions.code_style -j 1 --enable R --disable C x.py y.py, I get some R6104 lints as desired:

% pylint --load-plugins pylint.extensions.code_style -j 1 --enable R --disable C x.py y.py
************* Module x
x.py:5:0: R6104: Use '/=' to do an augmented assign directly (consider-using-augmented-assign)
************* Module y
y.py:5:0: R6104: Use '/=' to do an augmented assign directly (consider-using-augmented-assign)

-------------------------------------------------------------------
Your code has been rated at 6.67/10 (previous run: 10.00/10, -3.33)

But, if I pick a --jobs value more than 1, then I get no lints (of this type) at all:

% pylint --load-plugins pylint.extensions.code_style -j 2 --enable R --disable C x.py y.py

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

I've only noticed this for this check, but I can't say for sure that no other checks are impacted by this.

Configuration

(default)

Command used

pylint --load-plugins pylint.extensions.code_style -j 2 --enable R --disable C x.py y.py

Pylint output

% pylint --load-plugins pylint.extensions.code_style -j 2 --enable R --disable C x.py y.py


Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

Expected behavior

************* Module x
x.py:5:0: R6104: Use '/=' to do an augmented assign directly (consider-using-augmented-assign)
************* Module y
y.py:5:0: R6104: Use '/=' to do an augmented assign directly (consider-using-augmented-assign)


Your code has been rated at 6.67/10 (previous run: 10.00/10, -3.33)

Pylint version

pylint 3.3.1
astroid 3.3.5
Python 3.11.10

OS / Environment

Debian 11

Additional dependencies

No response

@Redoubts Redoubts added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Oct 20, 2024
@jacobtylerwalls jacobtylerwalls added Bug 🪲 multiprocessing and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Oct 21, 2024
@jacobtylerwalls
Copy link
Member

Thanks for the report. Reproduced with just a single file with the provided commands.

@jacobtylerwalls jacobtylerwalls added the Needs PR This issue is accepted, sufficiently specified and now needs an implementation label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 multiprocessing Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

No branches or pull requests

2 participants