mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 19:26:52 +00:00
Added tests for check_toml
Also assures we print filename when error occurs.
This commit is contained in:
parent
8d7d40c7cc
commit
317aef4961
2 changed files with 33 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
|||
with open(filename) as f:
|
||||
toml.load(f)
|
||||
except toml.TomlDecodeError as exc:
|
||||
print(exc)
|
||||
print('{}: {}'.format(filename, exc))
|
||||
retval = 1
|
||||
return retval
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue