Skip to content

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

Open
@Redoubts

Description

@Redoubts

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🪲Needs PRThis issue is accepted, sufficiently specified and now needs an implementationmultiprocessing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions