mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Use Hook api in languages
This commit is contained in:
parent
5f9a667470
commit
b59d7197ff
18 changed files with 41 additions and 38 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue