mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-02 10:56:52 +00:00
Update project setup.
This commit is contained in:
parent
13b4ca54cf
commit
b80ca9e84a
23 changed files with 186 additions and 112 deletions
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import ast
|
||||
|
|
@ -39,7 +40,14 @@ def check_file_for_debug_statements(filename):
|
|||
visitor.visit(ast_obj)
|
||||
if visitor.debug_import_statements:
|
||||
for debug_statement in visitor.debug_import_statements:
|
||||
print '{0}:{2}:{3} - {1} imported'.format(filename, *debug_statement)
|
||||
print(
|
||||
'{0}:{1}:{2} - {3} imported'.format(
|
||||
filename,
|
||||
debug_statement.line,
|
||||
debug_statement.col,
|
||||
debug_statement.name,
|
||||
)
|
||||
)
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue