mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 12:06:53 +00:00
Fix CI by upgrading AP templates
This commit is contained in:
parent
31853d6c43
commit
fea76b9ea1
8 changed files with 39 additions and 34 deletions
|
|
@ -23,14 +23,15 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
|||
with open(filename, 'rb') as f:
|
||||
ast.parse(f.read(), filename=filename)
|
||||
except SyntaxError:
|
||||
print('{}: failed parsing with {} {}:'.format(
|
||||
filename,
|
||||
platform.python_implementation(),
|
||||
sys.version.partition(' ')[0],
|
||||
))
|
||||
print('\n{}'.format(
|
||||
' ' + traceback.format_exc().replace('\n', '\n '),
|
||||
))
|
||||
print(
|
||||
'{}: failed parsing with {} {}:'.format(
|
||||
filename,
|
||||
platform.python_implementation(),
|
||||
sys.version.partition(' ')[0],
|
||||
),
|
||||
)
|
||||
tb = ' ' + traceback.format_exc().replace('\n', '\n ')
|
||||
print('\n{}'.format(tb))
|
||||
retval = 1
|
||||
return retval
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue