From 4e8374f9292803e5444fdb4610009764c033c584 Mon Sep 17 00:00:00 2001 From: Manu Raghavan Date: Wed, 10 Jun 2020 16:11:19 +0530 Subject: [PATCH] Debug --- pre_commit_hooks/no_commit_keywords.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pre_commit_hooks/no_commit_keywords.py b/pre_commit_hooks/no_commit_keywords.py index a200b25..2f942fb 100644 --- a/pre_commit_hooks/no_commit_keywords.py +++ b/pre_commit_hooks/no_commit_keywords.py @@ -11,8 +11,10 @@ def check_for_no_commit_tokens( ) -> str: with open(filename, mode='r', encoding='utf-8') as file_processed: lines = file_processed.read() + print(f"check_for#tokens - {tokens}") for token in tokens: match = re.search(token, lines) + print(f"check_for#token,match - {token}, {match}") if match: # no-commit token is present # return offending token @@ -33,7 +35,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int: args = parser.parse_args(argv) return_code = 0 - print(args.tokens) + print(f"tokens - {args.tokens}") if args.tokens: tokens = args.tokens.split(",")