Exemplo n.º 1
0
 def __str__(self) -> str:
     return short_name(self.name)
Exemplo n.º 2
0
 def short_name(self) -> str:
     return short_name(self.name)
Exemplo n.º 3
0
 def visit_dec_ref(self, op: DecRef) -> str:
     s = self.format('%sdec_ref %r', 'x' if op.is_xdec else '', op.src)
     # TODO: Remove bool check (it's unboxed)
     if is_bool_rprimitive(op.src.type) or is_int_rprimitive(op.src.type):
         s += ' :: {}'.format(short_name(op.src.type.name))
     return s
Exemplo n.º 4
0
Arquivo: ops.py Projeto: phani987/mypy
 def to_str(self, env: Environment) -> str:
     s = env.format('%sdec_ref %r', 'x' if self.is_xdec else '', self.src)
     if is_bool_rprimitive(self.src.type) or is_int_rprimitive(
             self.src.type):
         s += ' :: {}'.format(short_name(self.src.type.name))
     return s
Exemplo n.º 5
0
 def visit_inc_ref(self, op: IncRef) -> str:
     s = self.format('inc_ref %r', op.src)
     # TODO: Remove bool check (it's unboxed)
     if is_bool_rprimitive(op.src.type) or is_int_rprimitive(op.src.type):
         s += ' :: {}'.format(short_name(op.src.type.name))
     return s