All class inheriting CheckerTemplateMethod now call super._add_arguments_to_parser

This commit is contained in:
Alvaro Andrés Rodríguez Scelza 2019-06-13 14:04:25 -03:00
parent e6f32eb8ae
commit 1e7b96e4c0
2 changed files with 2 additions and 0 deletions

View file

@ -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):

View file

@ -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):