File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
from mypy .util import short_type , IdMapper
9
9
import mypy .nodes
10
- from mypy .visitor import NodeVisitor
10
+ from mypy .visitor import AbstractNodeVisitor
11
11
12
12
13
- class StrConv (NodeVisitor [str ]):
13
+ class StrConv (AbstractNodeVisitor [str ]):
14
14
"""Visitor for converting a node to a human-readable string.
15
15
16
16
For example, an MypyFile node from program '1' is converted into
@@ -503,6 +503,9 @@ def visit_slice_expr(self, o: 'mypy.nodes.SliceExpr') -> str:
503
503
def visit_backquote_expr (self , o : 'mypy.nodes.BackquoteExpr' ) -> str :
504
504
return self .dump ([o .expr ], o )
505
505
506
+ def visit_temp_node (self , o : 'mypy.nodes.TempNode' ) -> str :
507
+ return self .dump ([o .type ], o )
508
+
506
509
507
510
def dump_tagged (nodes : Sequence [object ], tag : str , str_conv : 'StrConv' ) -> str :
508
511
"""Convert an array into a pretty-printed multiline string representation.
You can’t perform that action at this time.
0 commit comments