class documentation

class SimplifyContainers(visitors.Visitor): (source)

View In Hierarchy

Simplifies containers whose type parameters are all Any. For example, this will change def f() -> List[any] to def f() -> list Note that we don't simplify TupleType or CallableType, since they have variable-length parameters, and the parameter length is meaningful even when the parameters are all Any.

Method VisitGenericType Undocumented
Method _Simplify Undocumented

Inherited from Visitor:

Method __init__ Undocumented
Method Enter Undocumented
Method Leave Undocumented
Method Visit Undocumented
Class Variable old_node Undocumented
Class Variable unchecked_node_names Undocumented
Class Variable visits_all_node_types Undocumented
Instance Variable enter_functions Undocumented
Instance Variable leave_functions Undocumented
Instance Variable visit_class_names Undocumented
Instance Variable visit_functions Undocumented
Class Variable _visitor_functions_cache Undocumented
def VisitGenericType(self, t): (source)

Undocumented

def _Simplify(self, t): (source)

Undocumented