mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
Use toml rather than pytoml
Pytoml has an issue with error messages: https://github.com/avakar/pytoml/issues/41
This commit is contained in:
parent
cb365ba9c3
commit
dc641085e7
2 changed files with 4 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ import sys
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from typing import Sequence
|
from typing import Sequence
|
||||||
|
|
||||||
import pytoml
|
import toml
|
||||||
|
|
||||||
|
|
||||||
def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
||||||
|
|
@ -17,8 +17,8 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
||||||
for filename in args.filenames:
|
for filename in args.filenames:
|
||||||
try:
|
try:
|
||||||
with open(filename) as f:
|
with open(filename) as f:
|
||||||
pytoml.load(f)
|
toml.load(f)
|
||||||
except pytoml.TomlError as exc:
|
except toml.TomlDecodeError as exc:
|
||||||
print(exc)
|
print(exc)
|
||||||
retval = 1
|
retval = 1
|
||||||
return retval
|
return retval
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ packages = find:
|
||||||
install_requires =
|
install_requires =
|
||||||
flake8
|
flake8
|
||||||
ruamel.yaml>=0.15
|
ruamel.yaml>=0.15
|
||||||
pytoml
|
toml
|
||||||
six
|
six
|
||||||
typing; python_version<"3.5"
|
typing; python_version<"3.5"
|
||||||
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
|
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue