summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-11-24 09:23:18 +0100
committerGitHub <noreply@github.com>2021-11-24 09:23:18 +0100
commite3a1e359704a48d8bbe8ce00e54f4ddfebcf620e (patch)
tree3113641a8f5290da8a06e9241c2a488aeacb4b08
parentd58a7c019df0bde1ae5edde35a628b861715c758 (diff)
downloadpylint-git-e3a1e359704a48d8bbe8ce00e54f4ddfebcf620e.tar.gz
Make parallel checker use ``MessageLocationTuple`` for ``Message`` (#5381)
-rw-r--r--pylint/lint/parallel.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pylint/lint/parallel.py b/pylint/lint/parallel.py
index f6bd2aa09..56cee9aa7 100644
--- a/pylint/lint/parallel.py
+++ b/pylint/lint/parallel.py
@@ -8,7 +8,7 @@ from typing import Any, DefaultDict, Iterable, List, Tuple
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:
@@ -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)