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

Method get_metaclass_hook

mypy/plugin.py:764–773  ·  view source on GitHub ↗

Update class definition for given declared metaclasses. Same as get_class_decorator_hook() but for metaclasses. Note: this hook will be only called for explicit metaclasses, not for inherited ones. TODO: probably it should also be called on inherited metaclasses.

(self, fullname: str)

Source from the content-addressed store, hash-verified

762 return None
763
764 def get_metaclass_hook(self, fullname: str) -> Callable[[ClassDefContext], None] | None:
765 """Update class definition for given declared metaclasses.
766
767 Same as get_class_decorator_hook() but for metaclasses. Note:
768 this hook will be only called for explicit metaclasses, not for
769 inherited ones.
770
771 TODO: probably it should also be called on inherited metaclasses.
772 """
773 return None
774
775 def get_base_class_hook(self, fullname: str) -> Callable[[ClassDefContext], None] | None:
776 """Update class definition for given base classes.

Callers 2

get_metaclass_hookMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected