From 7a5742bb577205185326e307e68f7c9362a6942e Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sat, 5 Jan 2019 12:00:56 +1100 Subject: [PATCH] tools/spec: add basic type hinting for write_foo functions --- tools/spec.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/spec.py b/tools/spec.py index 6b715fc..99e04f8 100644 --- a/tools/spec.py +++ b/tools/spec.py @@ -716,7 +716,7 @@ def parse_extensions(reg:registry, root): ############################################################################### -def write_header(path:str, q): +def write_header(path:str, q:List[type]): with open(path, 'w') as dst: dst.write("#pragma once\n") @@ -768,7 +768,7 @@ def write_header(path:str, q): ##----------------------------------------------------------------------------- -def write_icd(path:str, q): +def write_icd(path:str, q:List[type]): with open(path, 'w') as icd: commands = [i for i in q if isinstance(i, command)] instance_commands = [i for i in commands if i.is_instance(reg)] @@ -815,7 +815,7 @@ def write_icd(path:str, q): ##----------------------------------------------------------------------------- -def write_dispatch(path:str, q): +def write_dispatch(path:str, q:List[type]): with open(path, 'w') as dispatch: dispatch.write(""" #include "../vk.hpp"