File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,8 +102,11 @@ def dispatch_type(self, type_hint):
102102 unparsed = horast .unparse (type_hint .value ).strip ()
103103 self .write (unparsed )
104104 self .write ('<' )
105- self .write (horast .unparse (type_hint .slice ).strip ())
106- self .write ('>' )
105+ if isinstance (type_hint .slice , typed_ast3 .Subscript ):
106+ self .dispatch_type (type_hint .slice )
107+ else :
108+ self .write (horast .unparse (type_hint .slice ).strip ())
109+ self .write (' >' )
107110 if isinstance (type_hint .slice , typed_ast3 .Index ):
108111 self .write ('&' )
109112 return
@@ -159,7 +162,10 @@ def _AnnAssign(self, t):
159162 self ._unsupported_syntax (t , ' which is not simple' )
160163 self .dispatch_type (t .annotation )
161164 self .write (' ' )
162- self .dispatch (t .target )
165+ try :
166+ self .dispatch (t .target )
167+ except AttributeError as e :
168+ print (e )
163169 if t .value :
164170 self .write (' = ' )
165171 self .dispatch (t .value )
You can’t perform that action at this time.
0 commit comments