예제 #1
0
파일: suggestions.py 프로젝트: Zac-HD/mypy
 def visit_type_alias_type(self, t: TypeAliasType) -> Type:
     return t.copy_modified(args=[a.accept(self) for a in t.args])
예제 #2
0
 def visit_type_alias_type(self, t: TypeAliasType) -> Type:
     # Target of the type alias cannot contain type variables,
     # so we just expand the arguments.
     return t.copy_modified(args=self.expand_types(t.args))
예제 #3
0
파일: suggestions.py 프로젝트: Zac-HD/mypy
 def visit_type_alias_type(self, t: TypeAliasType) -> Type:
     exp_t = get_proper_type(t)
     if isinstance(exp_t,
                   Instance) and exp_t.type.fullname == 'builtins.str':
         return self.text_type
     return t.copy_modified(args=[a.accept(self) for a in t.args])
예제 #4
0
 def visit_type_alias_type(self, t: TypeAliasType) -> Type:
     # Type alias target can't contain bound type variables, so
     # it is safe to just erase the arguments.
     return t.copy_modified(args=[a.accept(self) for a in t.args])