pylint: enable use-sequence-for-iteration

This found a couple of places where we *don't* want to use set(), and
want to use list() instead.
pull/10783/head
Dylan Baker 3 years ago committed by Eli Schwartz
parent 188c552dcf
commit 6f7ea0cc28
  1. 1
      .pylintrc
  2. 2
      mesonbuild/build.py
  3. 2
      mesonbuild/interpreter/interpreter.py

@ -88,7 +88,6 @@ disable=
use-dict-literal,
use-implicit-booleaness-not-comparison,
use-list-literal,
use-sequence-for-iteration,
used-before-assignment,
useless-return,
useless-super-delegation,

@ -1002,7 +1002,7 @@ class BuildTarget(Target):
return missing_languages
def validate_sources(self):
if len(self.compilers) > 1 and any(lang in self.compilers for lang in {'cs', 'java'}):
if len(self.compilers) > 1 and any(lang in self.compilers for lang in ['cs', 'java']):
langs = ', '.join(self.compilers.keys())
raise InvalidArguments(f'Cannot mix those languages into a target: {langs}')

@ -2475,7 +2475,7 @@ class Interpreter(InterpreterBase, HoldableObject):
)
def func_configure_file(self, node: mparser.BaseNode, args: T.List[TYPE_var],
kwargs: kwtypes.ConfigureFile):
actions = sorted(x for x in {'configuration', 'command', 'copy'}
actions = sorted(x for x in ['configuration', 'command', 'copy']
if kwargs[x] not in [None, False])
num_actions = len(actions)
if num_actions == 0:

Loading…
Cancel
Save