* pygnulib/GLModuleSystem.py (GLModuleSystem.__init__): Store the
avoided modules in a set instead of a list. This is used only for
membership checks when computing the transitive closure of the given
modules, therefore prefer the O(1) average case over O(n).
+2024-04-09 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Change the avoid list to a set for lookups.
+ * pygnulib/GLModuleSystem.py (GLModuleSystem.__init__): Store the
+ avoided modules in a set instead of a list. This is used only for
+ membership checks when computing the transitive closure of the given
+ modules, therefore prefer the O(1) average case over O(n).
+
2024-04-09 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Remove unused setter and getter functions.
% type(inc_all_direct_tests).__name__)
self.inc_all_direct_tests = inc_all_direct_tests
self.inc_all_indirect_tests = inc_all_indirect_tests
- self.avoids = [] # Avoids
+ self.avoids = set()
for avoid in self.config.getAvoids():
module = self.modulesystem.find(avoid)
if module:
- self.avoids.append(module)
+ self.avoids.add(module)
def __repr__(self) -> str:
'''x.__repr__() <==> repr(x)'''