mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 11:36:54 +00:00
All class inheriting CheckerTemplateMethod now call super._add_arguments_to_parser
This commit is contained in:
parent
e6f32eb8ae
commit
1e7b96e4c0
2 changed files with 2 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ from pre_commit_hooks.loaderon_hooks.util.template_methods.checker_template_meth
|
|||
|
||||
class BranchNameChecker(CheckerTemplateMethod):
|
||||
def _add_arguments_to_parser(self):
|
||||
super(BranchNameChecker, self)._add_arguments_to_parser()
|
||||
self.parser.add_argument('-r', '--regex', help='Regex that git current branch must match.')
|
||||
|
||||
def _perform_checks(self):
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ class FileCheckerTemplateMethod(CheckerTemplateMethod):
|
|||
self.filename = ''
|
||||
|
||||
def _add_arguments_to_parser(self):
|
||||
super(FileCheckerTemplateMethod, self)._add_arguments_to_parser()
|
||||
self.parser.add_argument('filenames', nargs='*')
|
||||
|
||||
def _perform_checks(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue