mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
corrected import errors.
corrected print lack of parenthesis errors.
This commit is contained in:
parent
4d1b75fb33
commit
1be6dd5dfb
15 changed files with 35 additions and 33 deletions
|
|
@ -3,7 +3,7 @@ import argparse
|
|||
from abc import abstractmethod
|
||||
from argparse import ArgumentTypeError
|
||||
|
||||
from pre_commit_logic.util.check_failed_exception import CheckFailedException
|
||||
from pre_commit_hooks.loaderon_hooks.util.check_failed_exception import CheckFailedException
|
||||
|
||||
|
||||
class CheckerTemplateMethod(object):
|
||||
|
|
@ -25,10 +25,10 @@ class CheckerTemplateMethod(object):
|
|||
self._perform_checks()
|
||||
return 0
|
||||
except ArgumentTypeError as ex:
|
||||
print ex.message
|
||||
print(ex.message)
|
||||
return 1
|
||||
except CheckFailedException as ex:
|
||||
print ex.message
|
||||
print(ex.message)
|
||||
return 2
|
||||
|
||||
@abstractmethod
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from abc import abstractmethod
|
||||
|
||||
from pre_commit_logic.util.template_methods.files_bunches_checker_template_method import \
|
||||
from pre_commit_hooks.loaderon_hooks.util.template_methods.files_bunches_checker_template_method import \
|
||||
FileBunchesCheckerTemplateMethod
|
||||
from pre_commit_logic.util.template_methods.lines_checker_template_method import LinesCheckerTemplateMethod
|
||||
from pre_commit_hooks.loaderon_hooks.util.template_methods.lines_checker_template_method import \
|
||||
LinesCheckerTemplateMethod
|
||||
|
||||
|
||||
class FileBunchesLinesCheckerTemplateMethod(FileBunchesCheckerTemplateMethod, LinesCheckerTemplateMethod):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from abc import abstractmethod
|
||||
|
||||
from pre_commit_logic.util.template_methods.checker_template_method import CheckerTemplateMethod
|
||||
from pre_commit_hooks.loaderon_hooks.util.template_methods.checker_template_method import CheckerTemplateMethod
|
||||
|
||||
|
||||
class FileCheckerTemplateMethod(CheckerTemplateMethod):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from abc import abstractmethod
|
||||
|
||||
from pre_commit_logic.util.file_helpers import split_by_regexp
|
||||
from pre_commit_logic.util.template_methods.file_checker_template_method import FileCheckerTemplateMethod
|
||||
from pre_commit_hooks.loaderon_hooks.util.file_helpers import split_by_regexp
|
||||
from pre_commit_hooks.loaderon_hooks.util.template_methods.file_checker_template_method import FileCheckerTemplateMethod
|
||||
|
||||
|
||||
class FileBunchesCheckerTemplateMethod(FileCheckerTemplateMethod):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from abc import abstractmethod
|
||||
|
||||
from pre_commit_logic.util.template_methods.file_checker_template_method import FileCheckerTemplateMethod
|
||||
from pre_commit_logic.util.file_helpers import read_file_lines
|
||||
from pre_commit_hooks.loaderon_hooks.util.file_helpers import read_file_lines
|
||||
from pre_commit_hooks.loaderon_hooks.util.template_methods.file_checker_template_method import FileCheckerTemplateMethod
|
||||
|
||||
|
||||
class LinesCheckerTemplateMethod(FileCheckerTemplateMethod):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue