You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't find any documention or other issues on this, so I'm not sure if this is intended behavior (and undocumented) or just a bug.
Tested with isort 5.13.2, running isort --diff --jobs=2 acts the same as isort --jobs=2 (that is, the --diff option is ignored). I could imagine there might be a concern about interleaving diff output from different jobs, in which case I think there are a couple options:
Disallow --diff --jobs (and equivalent config) entirely and display an error (and document this behavior)
Implement some kind of locking to serialize the diffs from different jobs
Do nothing to prevent interleaving and hope for the best (maybe document this as a caveat?)
From a quick test, adding show_diff=show_diff to the executor.imap call seems to work in simple cases (effectively option 3) but I haven't tested it extensively with lots of files at once or high job counts.
The text was updated successfully, but these errors were encountered:
I couldn't find any documention or other issues on this, so I'm not sure if this is intended behavior (and undocumented) or just a bug.
Tested with
isort 5.13.2
, runningisort --diff --jobs=2
acts the same asisort --jobs=2
(that is, the--diff
option is ignored). I could imagine there might be a concern about interleaving diff output from different jobs, in which case I think there are a couple options:--diff --jobs
(and equivalent config) entirely and display an error (and document this behavior)The cause of the current behavior seems pretty clear:
show_diff
is not plumbed into the executor ifjobs
is used: https://github.com/PyCQA/isort/blob/main/isort/main.py#L1193-L1223From a quick test, adding
show_diff=show_diff
to theexecutor.imap
call seems to work in simple cases (effectively option 3) but I haven't tested it extensively with lots of files at once or high job counts.The text was updated successfully, but these errors were encountered: