MCPcopy Index your code
hub / github.com/python/mypy / is_class_scope

Method is_class_scope

mypy/semanal.py:7444–7445  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7442 return any(s in (SCOPE_FUNC, SCOPE_COMPREHENSION) for s in self.scope_stack)
7443
7444 def is_class_scope(self) -> bool:
7445 return self.type is not None and not self.is_func_scope()
7446
7447 def is_module_scope(self) -> bool:
7448 return not (self.is_class_scope() or self.is_func_scope())

Callers 14

analyze_func_defMethod · 0.95
process_overload_implMethod · 0.95
analyze_function_bodyMethod · 0.95
visit_decoratorMethod · 0.95
unwrap_finalMethod · 0.95
store_final_statusMethod · 0.95
check_classvarMethod · 0.95
visit_call_exprMethod · 0.95
add_imported_symbolMethod · 0.95
is_module_scopeMethod · 0.95

Calls 1

is_func_scopeMethod · 0.95

Tested by

no test coverage detected