-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support duplicate-code
message with --jobs
#8757
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Support ``duplicate-code`` message when parallelizing with ``--jobs``. | ||
|
||
Closes #374 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,7 +130,7 @@ def check_parallel( | |
"""Use the given linter to lint the files with given amount of workers (jobs). | ||
|
||
This splits the work filestream-by-filestream. If you need to do work across | ||
multiple files, as in the similarity-checker, then implement the map/reduce mixin functionality. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it no longer [considered] a mix-in class? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oooooh, hadn't seen those, sexy |
||
multiple files, as in the similarity-checker, then implement the map/reduce functionality. | ||
""" | ||
# The linter is inherited by all the pool's workers, i.e. the linter | ||
# is identical to the linter object here. This is required so that | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,7 +233,6 @@ def test_parallel_execution(self) -> None: | |
join(HERE, "functional", "a", "arguments.py"), | ||
], | ||
out=out, | ||
# We expect similarities to fail and an error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No reason to expect similarity to fail when checking only one file. Maybe an earlier version of this test checked the same file twice? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment was very unclear, sorry about that. It was meant to say something like:
|
||
code=MSG_TYPES_STATUS["E"], | ||
) | ||
assert ( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple as that is it! Great stuff!! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holy mother of Guido, was it that simple ?!