|
55 | 55 | ) |
56 | 56 | from mypy.traverser import TraverserVisitor |
57 | 57 | from mypy.types import ( |
58 | | - Type, TypeVisitor, Instance, AnyType, NoneTyp, CallableType, DeletedType, PartialType, |
| 58 | + Type, SyntheticTypeVisitor, Instance, AnyType, NoneTyp, CallableType, DeletedType, PartialType, |
59 | 59 | TupleType, TypeType, TypeVarType, TypedDictType, UnboundType, UninhabitedType, UnionType, |
60 | | - Overloaded, TypeVarDef, TypeList |
| 60 | + Overloaded, TypeVarDef, TypeList, CallableArgument, EllipsisType, StarType |
61 | 61 | ) |
62 | 62 | from mypy.util import get_prefix |
63 | 63 |
|
@@ -320,7 +320,7 @@ def replace_statements(self, nodes: List[Statement]) -> List[Statement]: |
320 | 320 | return result |
321 | 321 |
|
322 | 322 |
|
323 | | -class TypeReplaceVisitor(TypeVisitor[None]): |
| 323 | +class TypeReplaceVisitor(SyntheticTypeVisitor[None]): |
324 | 324 | """Similar to NodeReplaceVisitor, but for type objects.""" |
325 | 325 |
|
326 | 326 | def __init__(self, replacements: Dict[SymbolNode, SymbolNode]) -> None: |
@@ -389,6 +389,15 @@ def visit_type_list(self, typ: TypeList) -> None: |
389 | 389 | for item in typ.items: |
390 | 390 | item.accept(self) |
391 | 391 |
|
| 392 | + def visit_callable_argument(self, typ: CallableArgument) -> None: |
| 393 | + typ.typ.accept(self) |
| 394 | + |
| 395 | + def visit_ellipsis_type(self, typ: EllipsisType) -> None: |
| 396 | + pass |
| 397 | + |
| 398 | + def visit_star_type(self, typ: StarType) -> None: |
| 399 | + typ.type.accept(self) |
| 400 | + |
392 | 401 | def visit_uninhabited_type(self, typ: UninhabitedType) -> None: |
393 | 402 | pass |
394 | 403 |
|
|
0 commit comments