mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-02 10:56:52 +00:00
Support checking unicode TOML
This commit is contained in:
parent
2322277afd
commit
8febacdfed
2 changed files with 10 additions and 4 deletions
|
|
@ -13,8 +13,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
|
|||
retval = 0
|
||||
for filename in args.filenames:
|
||||
try:
|
||||
with open(filename) as f:
|
||||
toml.load(f)
|
||||
toml.load(filename)
|
||||
except toml.TomlDecodeError as exc:
|
||||
print(f'{filename}: {exc}')
|
||||
retval = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue