diff --git a/pre_commit_hooks/check_toml.py b/pre_commit_hooks/check_toml.py index 5f3b820..370830c 100644 --- a/pre_commit_hooks/check_toml.py +++ b/pre_commit_hooks/check_toml.py @@ -5,7 +5,7 @@ import sys from typing import Optional from typing import Sequence -import pytoml +import toml 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: try: with open(filename) as f: - pytoml.load(f) - except pytoml.TomlError as exc: + toml.load(f) + except toml.TomlDecodeError as exc: print(exc) retval = 1 return retval diff --git a/setup.cfg b/setup.cfg index 742707b..18d3492 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,7 +26,7 @@ packages = find: install_requires = flake8 ruamel.yaml>=0.15 - pytoml + toml six typing; python_version<"3.5" python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*