mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
always quote types in generated hooks
This commit is contained in:
parent
5114fde01c
commit
39f253f125
1 changed files with 1 additions and 2 deletions
|
|
@ -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'}]"
|
||||
|
|
|
|||
Loading…
Reference in a new issue