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

Method is_defined_in_module

mypy/stubgenc.py:406–409  ·  view source on GitHub ↗

Check if object is considered defined in the current module.

(self, obj: object)

Source from the content-addressed store, hash-verified

404 return getattr(obj, "__module__", None)
405
406 def is_defined_in_module(self, obj: object) -> bool:
407 """Check if object is considered defined in the current module."""
408 module = self.get_obj_module(obj)
409 return module is None or module == self.module_name
410
411 def generate_module(self) -> None:
412 all_items = self.get_members(self.module)

Callers 2

generate_moduleMethod · 0.95
generate_class_stubMethod · 0.95

Calls 1

get_obj_moduleMethod · 0.95

Tested by

no test coverage detected