From 3f42c844de6d556391ecf092a960881428b724b7 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Fri, 10 Jun 2022 01:50:24 -0400 Subject: [PATCH] flake8: fix non-idiomatic ordering of "if not in" checks --- mesonbuild/dependencies/dub.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesonbuild/dependencies/dub.py b/mesonbuild/dependencies/dub.py index 519f2f733..0680141aa 100644 --- a/mesonbuild/dependencies/dub.py +++ b/mesonbuild/dependencies/dub.py @@ -186,7 +186,7 @@ class DubDependency(ExternalDependency): for tgt in description['targets']: targets[tgt['rootPackage']] = tgt - if not name in targets: + if name not in targets: self.is_found = False if self.pkg['targetType'] == 'sourceLibrary': # source libraries have no associated targets, @@ -231,13 +231,13 @@ class DubDependency(ExternalDependency): self.compile_args.append('-I' + path) for path in bs['stringImportPaths']: - if not 'import_dir' in d_feature_args[self.compiler.id]: + if 'import_dir' not in d_feature_args[self.compiler.id]: break flag = d_feature_args[self.compiler.id]['import_dir'] self.compile_args.append(f'{flag}={path}') for ver in bs['versions']: - if not 'version' in d_feature_args[self.compiler.id]: + if 'version' not in d_feature_args[self.compiler.id]: break flag = d_feature_args[self.compiler.id]['version'] self.compile_args.append(f'{flag}={ver}')