@@ -18,7 +18,7 @@ def f(x: int) -> int:
1818
1919from mypy .nodes import (
2020 Node , MypyFile , FuncDef , ReturnStmt , AssignmentStmt , OpExpr , IntExpr , NameExpr , LDEF , Var ,
21- IfStmt , Node , UnaryExpr , ComparisonExpr , WhileStmt , Argument , CallExpr , IndexExpr , Block ,
21+ IfStmt , UnaryExpr , ComparisonExpr , WhileStmt , Argument , CallExpr , IndexExpr , Block ,
2222 Expression , ListExpr , ExpressionStmt , MemberExpr , ForStmt , RefExpr , Lvalue , BreakStmt ,
2323 ContinueStmt , ConditionalExpr , OperatorAssignmentStmt , TupleExpr , ClassDef , TypeInfo ,
2424 Import , ImportFrom , ImportAll , DictExpr , StrExpr , CastExpr , TempNode , ARG_POS , MODULE_REF
@@ -147,12 +147,12 @@ def __init__(self, types: Dict[Expression, Type], mapper: Mapper) -> None:
147147 self .continue_gotos = [] # type: List[List[Goto]]
148148
149149 self .mapper = mapper
150- self .imports = [] # type: List[str]
150+ self .imports = [] # type: List[str]
151151
152152 # Maps unicode literals to the static c name for that literal
153- self .unicode_literals = {} # type: Dict[str, str]
153+ self .unicode_literals = {} # type: Dict[str, str]
154154
155- self .current_module_name = None # type: Optional[str]
155+ self .current_module_name = None # type: Optional[str]
156156
157157 def visit_mypy_file (self , mypyfile : MypyFile ) -> Value :
158158 if mypyfile .fullname () in ('typing' , 'abc' ):
@@ -500,7 +500,6 @@ def visit_for_stmt(self, s: ForStmt) -> Value:
500500 assert isinstance (s .index .node , Var )
501501 lvalue_reg = self .environment .add_local (s .index .node , self .node_type (s .index ))
502502
503-
504503 condition_block = self .goto_new_block ()
505504
506505 # For compatibility with python semantics we recalculate the length
@@ -573,8 +572,8 @@ def binary_op(self,
573572 if (is_subtype (lreg .type , desc .arg_types [0 ])
574573 and is_subtype (rreg .type , desc .arg_types [1 ])):
575574 if matching :
576- assert matching .priority != desc .priority , 'Ambiguous: %s, %s' % (matching ,
577- desc )
575+ assert matching .priority != desc .priority , 'Ambiguous: %s, %s' % (matching ,
576+ desc )
578577 if desc .priority > matching .priority :
579578 matching = desc
580579 else :
@@ -665,7 +664,7 @@ def load_static_module_attr(self, expr: RefExpr) -> Value:
665664
666665 def py_call (self , function : Value , args : List [Value ],
667666 target_type : RType , line : int ) -> Value :
668- arg_boxes = [self .box (arg ) for arg in args ] # type: List[Value]
667+ arg_boxes = [self .box (arg ) for arg in args ] # type: List[Value]
669668 target_box = self .add (PyCall (function , arg_boxes , line ))
670669 return self .unbox_or_cast (target_box , target_type , line )
671670
@@ -675,7 +674,7 @@ def py_method_call(self,
675674 args : List [Value ],
676675 target_type : RType ,
677676 line : int ) -> Value :
678- arg_boxes = [self .box (arg ) for arg in args ] # type: List[Value]
677+ arg_boxes = [self .box (arg ) for arg in args ] # type: List[Value]
679678 target_box = self .add (PyMethodCall (obj , method , arg_boxes ))
680679 return self .unbox_or_cast (target_box , target_type , line )
681680
@@ -691,7 +690,6 @@ def coerce_native_call_args(self,
691690 coerced_arg_regs .append (self .coerce (reg , arg_type , line ))
692691 return coerced_arg_regs
693692
694-
695693 def visit_call_expr (self , expr : CallExpr ) -> Value :
696694 if isinstance (expr .analyzed , CastExpr ):
697695 return self .translate_cast_expr (expr .analyzed )
0 commit comments