From: Collin Funk Date: Tue, 16 Apr 2024 15:36:55 +0000 (-0700) Subject: gnulib-tool.py: Prefer 'not in' over 'not ... in'. X-Git-Tag: v1.0~79 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=886f8476800908ceda4755a2444a23e0814c2abd;p=gnulib.git gnulib-tool.py: Prefer 'not in' over 'not ... in'. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Change conditional. * pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 56dade056b..03c6919131 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-04-16 Collin Funk + + gnulib-tool.py: Prefer 'not in' over 'not ... in'. + * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Change conditional. + * pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Likewise. + 2024-04-16 Collin Funk gnulib-tool.py: Make data structures more clear. diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index 558f130bbb..ff4e3027d6 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -218,7 +218,7 @@ class GLEmiter: if str(module) in ['gnumakefile', 'maintainer-makefile']: # These modules are meant to be used only in the top-level directory. flag = toplevel - else: # if not str(module) in ['gnumakefile', 'maintainer-makefile'] + else: # if str(module) not in ['gnumakefile', 'maintainer-makefile'] flag = True if flag: snippet = module.getAutoconfSnippet() diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index 11f8934026..3148f921e1 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -767,7 +767,7 @@ class GLModuleTable: if not (type(condition) is str or condition == True): raise TypeError('condition must be a string or True, not %s' % type(condition).__name__) - if not str(module) in self.unconditionals: + if str(module) not in self.unconditionals: # No unconditional dependency to the given module is known at this point. if str(module) not in self.dependers: self.dependers[str(module)] = []