mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
reached 100% testing cover
This commit is contained in:
parent
a9d54a63fc
commit
8e79502b8a
10 changed files with 13 additions and 0 deletions
|
|
@ -17,9 +17,11 @@ class FileBunchesLinesCheckerTemplateMethod(FileBunchesCheckerTemplateMethod, Li
|
|||
This method uses LinesCheckerTemplateMethod's _check_lines. Which receives self._file_lines. In this case, our
|
||||
'file lines' will be the bunches of lines got by split_by_classes.
|
||||
"""
|
||||
super(FileBunchesLinesCheckerTemplateMethod, self)._check_bunch()
|
||||
self._file_lines = self._bunch_of_lines
|
||||
self._check_lines()
|
||||
|
||||
@abstractmethod
|
||||
def _check_line(self):
|
||||
super(FileBunchesLinesCheckerTemplateMethod, self)._check_line()
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class FileBunchesCheckerTemplateMethod(FileCheckerTemplateMethod):
|
|||
self._bunch_of_lines = []
|
||||
|
||||
def _check_file(self):
|
||||
super(FileBunchesCheckerTemplateMethod, self)._check_file()
|
||||
regexp = self._get_regexp()
|
||||
bunches_of_lines = split_by_regexp(self.filename, regexp)
|
||||
for self._bunch_of_lines in bunches_of_lines:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ class LinesCheckerTemplateMethod(FileCheckerTemplateMethod):
|
|||
self._file_line_index = 0
|
||||
|
||||
def _check_file(self):
|
||||
super(LinesCheckerTemplateMethod, self)._check_file()
|
||||
self._file_lines = read_file_lines(self.filename)
|
||||
self._check_lines()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue