blob: b3dacfd4cf4433c6cd1c76e468657fbad8a25c54 [file] [log] [blame]
from mypy.plugin import Plugin
class MyPlugin(Plugin):
def get_function_hook(self, fullname):
if fullname == '__main__.f':
return my_hook
assert fullname
return None
def my_hook(ctx):
return ctx.api.named_generic_type('builtins.int', [])
def register(version):
return MyPlugin