@@ -434,8 +434,10 @@ def typecheck(
434434 for _ , runtime_expr in self .runtime .items ():
435435 errors .try1 (
436436 (
437- lambda runtime_expr : lambda : runtime_expr .infer_type (
438- type_env , stdlib , check_quant = check_quant , struct_types = struct_types
437+ lambda runtime_expr : (
438+ lambda : runtime_expr .infer_type (
439+ type_env , stdlib , check_quant = check_quant , struct_types = struct_types
440+ )
439441 )
440442 )(runtime_expr )
441443 ) # .typecheck()
@@ -644,9 +646,14 @@ def typecheck_input(
644646 decltype = decl .type .copy (optional = True ) if decl .expr else decl .type
645647 errors .try1 (
646648 (
647- lambda expr , decltype : lambda : expr .infer_type (
648- type_env , stdlib , check_quant = check_quant , struct_types = struct_types
649- ).typecheck (decltype )
649+ lambda expr , decltype : (
650+ lambda : expr .infer_type (
651+ type_env ,
652+ stdlib ,
653+ check_quant = check_quant ,
654+ struct_types = struct_types ,
655+ ).typecheck (decltype )
656+ )
650657 )(expr , decltype )
651658 )
652659 except KeyError :
@@ -1157,11 +1164,13 @@ def typecheck(self, doc: "Document", check_quant: bool) -> None:
11571164 for decl in self .inputs or []:
11581165 errors .try1 (
11591166 (
1160- lambda decl , type_env : lambda : decl .typecheck (
1161- type_env ,
1162- stdlib ,
1163- check_quant = check_quant ,
1164- struct_types = doc ._struct_types ,
1167+ lambda decl , type_env : (
1168+ lambda : decl .typecheck (
1169+ type_env ,
1170+ stdlib ,
1171+ check_quant = check_quant ,
1172+ struct_types = doc ._struct_types ,
1173+ )
11651174 )
11661175 )(decl , self ._type_env )
11671176 )
@@ -1482,8 +1491,8 @@ def typecheck(self, check_quant: bool = True) -> None:
14821491 names .add (task .name )
14831492 errors .try1 (
14841493 (
1485- lambda task : lambda : task . typecheck (
1486- self ._struct_types , check_quant = check_quant
1494+ lambda task : (
1495+ lambda : task . typecheck ( self ._struct_types , check_quant = check_quant )
14871496 )
14881497 )(task )
14891498 )
@@ -1768,11 +1777,13 @@ def _typecheck_workflow_body(
17681777 _translate_struct_mismatch (
17691778 doc ,
17701779 (
1771- lambda child , type_env : lambda : child .typecheck (
1772- type_env ,
1773- stdlib ,
1774- check_quant = check_quant ,
1775- struct_types = doc ._struct_types ,
1780+ lambda child , type_env : (
1781+ lambda : child .typecheck (
1782+ type_env ,
1783+ stdlib ,
1784+ check_quant = check_quant ,
1785+ struct_types = doc ._struct_types ,
1786+ )
17761787 )
17771788 )(child , self ._type_env ),
17781789 )
@@ -1783,8 +1794,10 @@ def _typecheck_workflow_body(
17831794 _translate_struct_mismatch (
17841795 doc ,
17851796 (
1786- lambda child , type_env : lambda : child .typecheck_input (
1787- doc ._struct_types , type_env , stdlib , check_quant = check_quant
1797+ lambda child , type_env : (
1798+ lambda : child .typecheck_input (
1799+ doc ._struct_types , type_env , stdlib , check_quant = check_quant
1800+ )
17881801 )
17891802 )(child , self ._type_env ),
17901803 )
@@ -1798,8 +1811,10 @@ def _typecheck_workflow_body(
17981811 _translate_struct_mismatch (
17991812 doc ,
18001813 (
1801- lambda child : lambda : _typecheck_workflow_body (
1802- doc , stdlib , check_quant , child
1814+ lambda child : (
1815+ lambda : _typecheck_workflow_body (
1816+ doc , stdlib , check_quant , child
1817+ )
18031818 )
18041819 )(child ),
18051820 )
0 commit comments