From 25a1a2c89c47f0b061ca25fb6b4ea42aee810826 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 1 Feb 2021 08:36:33 +1000 Subject: [PATCH] always quote types in generated hooks --- pylib/tools/hookslib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pylib/tools/hookslib.py b/pylib/tools/hookslib.py index 1ff3b7974..f8262aa92 100644 --- a/pylib/tools/hookslib.py +++ b/pylib/tools/hookslib.py @@ -36,8 +36,7 @@ class Hook: types = [] for arg in self.args or []: (name, type) = arg.split(":") - if "." in type: - type = '"' + type.strip() + '"' + type = '"' + type.strip() + '"' types.append(type) types_str = ", ".join(types) return f"Callable[[{types_str}], {self.return_type or 'None'}]"