Slide 36
Slide 36 text
def _callback(ctx: FunctionContext) -> mypy.types.Type:
return AnyType()
class _ExamplePlugin(Plugin):
def get_function_hook(
self,
fullname: str,
) -> Optional[Callable]:
if fullname == 'django.db.models.fields.CharField':
return _callback
def plugin(version: str) -> Type[Plugin]:
"""Plugin's public API and entrypoint."""
return _ExamplePlugin