From 798b6c5624944233d64ca575e7a1b3291158ef5e Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 2 Sep 2022 13:35:40 -0700 Subject: [PATCH] pylint: enable use-list-literal --- .pylintrc | 1 - mesonbuild/arglist.py | 2 +- mesonbuild/mtest.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pylintrc b/.pylintrc index e0790bf503b0..2a38bbe40ec0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -86,7 +86,6 @@ disable= use-a-generator, use-dict-literal, use-implicit-booleaness-not-comparison, - use-list-literal, used-before-assignment, useless-return, useless-super-delegation, diff --git a/mesonbuild/arglist.py b/mesonbuild/arglist.py index 48fa6abe9571..2f1ce3ca5b5f 100644 --- a/mesonbuild/arglist.py +++ b/mesonbuild/arglist.py @@ -119,7 +119,7 @@ def __init__(self, compiler: T.Union['Compiler', 'StaticLinker'], # This correctly deduplicates the entries after _can_dedup definition # Note: This function is designed to work without delete operations, as deletions are worsening the performance a lot. def flush_pre_post(self) -> None: - new = list() # type: T.List[str] + new = [] # type: T.List[str] pre_flush_set = set() # type: T.Set[str] post_flush = collections.deque() # type: T.Deque[str] post_flush_set = set() # type: T.Set[str] diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 8b2382907618..0e0edb896e63 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -882,7 +882,7 @@ def __init__(self, test: TestSerialisation, test_env: T.Dict[str, str], self._num = None # type: T.Optional[int] self.name = name self.timeout = timeout - self.results = list() # type: T.List[TAPParser.Test] + self.results = [] # type: T.List[TAPParser.Test] self.returncode = None # type: T.Optional[int] self.starttime = None # type: T.Optional[float] self.duration = None # type: T.Optional[float]