class documentation

class CheckerScope: (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method active_class Undocumented
Method active_self_type An instance or tuple type representing the current class.
Method enclosing_class Is there a class *directly* enclosing this function?
Method push_class Undocumented
Method push_function Undocumented
Method top_function Undocumented
Method top_non_lambda_function Undocumented
Instance Variable stack Undocumented
def __init__(self, module: MypyFile): (source)

Undocumented

def active_class(self) -> TypeInfo|None: (source)

Undocumented

def active_self_type(self) -> (Instance|TupleType)|None: (source)

An instance or tuple type representing the current class. This returns None unless we are in class body or in a method. In particular, inside a function nested in method this returns None.

def enclosing_class(self) -> TypeInfo|None: (source)

Is there a class *directly* enclosing this function?

@contextmanager
def push_class(self, info: TypeInfo) -> Iterator[None]: (source)

Undocumented

@contextmanager
def push_function(self, item: FuncItem) -> Iterator[None]: (source)

Undocumented

def top_function(self) -> FuncItem|None: (source)

Undocumented

def top_non_lambda_function(self) -> FuncItem|None: (source)

Undocumented

Undocumented