diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-14 19:37:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 19:37:49 +0200 |
commit | 8f872bf49c344d1d16b3573136d53b2cbda007c6 (patch) | |
tree | d203652d9d515b2a5d47cca6e1f7519a157d5990 /tests/test_check_parallel.py | |
parent | adf660a7300148a31cdb8bc25301bfd21af0602b (diff) | |
download | pylint-git-8f872bf49c344d1d16b3573136d53b2cbda007c6.tar.gz |
Use ``python-typing-update`` on half of the ``tests`` directory (#6317)
Diffstat (limited to 'tests/test_check_parallel.py')
-rw-r--r-- | tests/test_check_parallel.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_check_parallel.py b/tests/test_check_parallel.py index d41ed13f4..839f75c71 100644 --- a/tests/test_check_parallel.py +++ b/tests/test_check_parallel.py @@ -6,10 +6,11 @@ # pylint: disable=protected-access,missing-function-docstring,no-self-use +from __future__ import annotations + import argparse import multiprocessing import os -from typing import List import dill import pytest @@ -41,7 +42,7 @@ def _gen_file_data(idx: int = 0) -> FileItem: return file_data -def _gen_file_datas(count: int = 1) -> List[FileItem]: +def _gen_file_datas(count: int = 1) -> list[FileItem]: return [_gen_file_data(idx) for idx in range(count)] @@ -62,7 +63,7 @@ class SequentialTestChecker(BaseChecker): def __init__(self, linter: PyLinter) -> None: super().__init__(linter) - self.data: List[str] = [] + self.data: list[str] = [] self.linter = linter def process_module(self, _node: nodes.Module) -> None: @@ -101,7 +102,7 @@ class ParallelTestChecker(BaseChecker, MapReduceMixin): def __init__(self, linter: PyLinter) -> None: super().__init__(linter) - self.data: List[str] = [] + self.data: list[str] = [] self.linter = linter def open(self) -> None: @@ -116,7 +117,7 @@ class ParallelTestChecker(BaseChecker, MapReduceMixin): def get_map_data(self): return self.data - def reduce_map_data(self, linter: PyLinter, data: List[List[str]]) -> None: + def reduce_map_data(self, linter: PyLinter, data: list[list[str]]) -> None: recombined = type(self)(linter) recombined.open() aggregated = [] |