mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2025-08-14 17:31:28 +08:00
Support checking unicode TOML
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user