From bc45779c34883fe4c4e09f4ef0a1c2c0bb6c4d1a Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 7 Apr 2024 22:22:49 -0700 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ pygnulib/GLModuleSystem.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3beac9b999..efb797f5df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-04-08 Collin Funk + + 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 gnulib-tool.py: Remove unnecessary conditional. diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index d3f38c2b66..761c43c2e0 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -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: -- 2.39.5