Use Hook api in languages

This commit is contained in:
Anthony Sottile
2018-12-31 13:16:48 -08:00
parent 5f9a667470
commit b59d7197ff
18 changed files with 41 additions and 38 deletions

View File

@@ -100,7 +100,7 @@ class Hook(collections.namedtuple('Hook', ('src', 'prefix') + _KEYS)):
def run(self, file_args):
lang = languages[self.language]
return lang.run_hook(self.prefix, self._asdict(), file_args)
return lang.run_hook(self, file_args)
@classmethod
def create(cls, src, prefix, dct):