Skip to content

Commit

Permalink
Make parallel checker use MessageLocationTuple for Message (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord authored Nov 24, 2021
1 parent d58a7c0 commit e3a1e35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pylint/lint/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pylint import reporters
from pylint.lint.utils import _patch_sys_path
from pylint.message import Message
from pylint.typing import FileItem
from pylint.typing import FileItem, MessageLocationTuple
from pylint.utils import LinterStats, merge_stats

try:
Expand Down Expand Up @@ -138,7 +138,9 @@ def check_parallel(linter, jobs, files: Iterable[FileItem], arguments=None):
linter.file_state.base_name = base_name
linter.set_current_module(module, file_path)
for msg in messages:
msg = Message(*msg)
msg = Message(
msg[0], msg[1], MessageLocationTuple(*msg[2]), msg[3], msg[4]
)
linter.reporter.handle_message(msg) # type: ignore[attr-defined] # linter.set_reporter() call above makes linter have a reporter attr
all_stats.append(stats)
all_mapreduce_data[worker_idx].append(mapreduce_data)
Expand Down

0 comments on commit e3a1e35

Please sign in to comment.