]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Fix incomplete type hint.
authorCollin Funk <collin.funk1@gmail.com>
Mon, 8 Apr 2024 05:22:49 +0000 (22:22 -0700)
committerBruno Haible <bruno@clisp.org>
Mon, 8 Apr 2024 18:58:14 +0000 (20:58 +0200)
* pygnulib/GLModuleSystem.py (GLModuleTable.getCondition): Add None to
the return type hint. This is the return value when the module is not a
conditional dependency.

ChangeLog
pygnulib/GLModuleSystem.py

index 3beac9b999c4492ef0d9c155ccd8672fb6c035fb..efb797f5dfeb1cf2609e40c9f660b044516dd888 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-04-08  Collin Funk  <collin.funk1@gmail.com>
+
+       gnulib-tool.py: Fix incomplete type hint.
+       * pygnulib/GLModuleSystem.py (GLModuleTable.getCondition): Add None to
+       the return type hint. This is the return value when the module is not a
+       conditional dependency.
+
 2024-04-08  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Remove unnecessary conditional.
index d3f38c2b663df656d36ecf2d8b6b5cbd0fee1775..761c43c2e0ee0b3ce205807a714e53835ca6f50e 100644 (file)
@@ -813,7 +813,7 @@ class GLModuleTable:
         result = str(module) in self.dependers
         return result
 
-    def getCondition(self, parent: GLModule, module: GLModule) -> str | bool:
+    def getCondition(self, parent: GLModule, module: GLModule) -> str | bool | None:
         '''Return condition from parent to module. Condition can be string or True.
         If module is not in the list of conddeps, method returns None.'''
         if type(parent) is not GLModule: