From b8e53ed5ea9c2a3eec19396233e646d4c1f667ae Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 2 Sep 2022 16:26:44 -0700 Subject: [PATCH] pylint: enable use-dict-literal --- .pylintrc | 1 - mesonbuild/mtest.py | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.pylintrc b/.pylintrc index 2a38bbe40ec0..945dca7fc12f 100644 --- a/.pylintrc +++ b/.pylintrc @@ -84,7 +84,6 @@ disable= unused-argument, unused-variable, use-a-generator, - use-dict-literal, use-implicit-booleaness-not-comparison, used-before-assignment, useless-return, diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 0e0edb896e63..c03c3eb000e0 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -1902,7 +1902,7 @@ def log_start_test(self, test: TestRun) -> None: async def _run_tests(self, runners: T.List[SingleTestRunner]) -> None: semaphore = asyncio.Semaphore(self.options.num_processes) futures = deque() # type: T.Deque[asyncio.Future] - running_tests = dict() # type: T.Dict[asyncio.Future, str] + running_tests = {} # type: T.Dict[asyncio.Future, str] interrupted = False ctrlc_times = deque(maxlen=MAX_CTRLC) # type: T.Deque[float] @@ -2007,9 +2007,9 @@ def convert_path_to_target(path: str) -> str: assert len(ninja) > 0 - depends = set() # type: T.Set[str] - targets = set() # type: T.Set[str] - intro_targets = dict() # type: T.Dict[str, T.List[str]] + depends = set() # type: T.Set[str] + targets = set() # type: T.Set[str] + intro_targets = {} # type: T.Dict[str, T.List[str]] for target in load_info_file(get_infodir(wd), kind='targets'): intro_targets[target['id']] = [ convert_path_to_target(f)