blob: b530a62d23aa133b73054d66c0ac41137b5146a7 [file] [log] [blame] [edit]
from mypy.plugin import Plugin
class Plugin2(Plugin):
def get_function_hook(self, fullname):
if fullname in ('__main__.f', '__main__.g'):
return str_hook
return None
def str_hook(ctx):
return ctx.api.named_generic_type('builtins.str', [])
def plugin(version):
return Plugin2