]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Prefer 'not in' over 'not ... in'.
authorCollin Funk <collin.funk1@gmail.com>
Tue, 16 Apr 2024 15:36:55 +0000 (08:36 -0700)
committerBruno Haible <bruno@clisp.org>
Tue, 16 Apr 2024 18:17:58 +0000 (20:17 +0200)
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Change conditional.
* pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Likewise.

ChangeLog
pygnulib/GLEmiter.py
pygnulib/GLModuleSystem.py

index 56dade056be4afcda7e39cac6fe64c1d4a148c5f..03c691913181af53be0d7a8925024da879d5abba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-04-16  Collin Funk  <collin.funk1@gmail.com>
+
+       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  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Make data structures more clear.
index 558f130bbbb105a835b1b1b156a0abc632c28709..ff4e3027d6e263c91527d43f801163867af3bff8 100644 (file)
@@ -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()
index 11f893402627f6abf04f9a5e5d7cfc6e460c3851..3148f921e127b341dfb62b1656ce2988b3f9d37e 100644 (file)
@@ -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)] = []