Skip to content

Commit 771156f

Browse files
MarSoftssbarnea
authored andcommitted
Use toml rather than pytoml
Pytoml has an issue with error messages: avakar/pytoml#41
1 parent ae70f7e commit 771156f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pre_commit_hooks/check_toml.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Optional
66
from typing import Sequence
77

8-
import pytoml
8+
import toml
99

1010

1111
def main(argv=None): # type: (Optional[Sequence[str]]) -> int
@@ -17,8 +17,8 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
1717
for filename in args.filenames:
1818
try:
1919
with open(filename) as f:
20-
pytoml.load(f)
21-
except pytoml.TomlError as exc:
20+
toml.load(f)
21+
except toml.TomlDecodeError as exc:
2222
print(exc)
2323
retval = 1
2424
return retval

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ packages = find:
2626
install_requires =
2727
flake8
2828
ruamel.yaml>=0.15
29-
pytoml
29+
toml
3030
six
3131
typing; python_version<"3.5"
3232
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*

0 commit comments

Comments
 (0)