third_party.pylibs.pylint.src/pylint/checkers/mapreduce_checker.py
Kian Meng, Ang 566a377154
Fix typos over the whole codebase (#5540)
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
2021-12-17 17:23:17 +01:00

20 lines
746 B
Python

# Copyright (c) 2020 Frank Harrison <frank@doublethefish.com>
# Copyright (c) 2021 Pierre Sassoulas <pierre.sassoulas@gmail.com>
# Copyright (c) 2021 Marc Mueller <30130371+cdce8p@users.noreply.github.com>
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
import abc
class MapReduceMixin(metaclass=abc.ABCMeta):
"""A mixin design to allow multiprocess/threaded runs of a Checker"""
@abc.abstractmethod
def get_map_data(self):
"""Returns mergeable/reducible data that will be examined"""
@abc.abstractmethod
def reduce_map_data(self, linter, data):
"""For a given Checker, receives data for all mapped runs"""