Skip to content

Commit

Permalink
Use dom_toml to read TOML files.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Mar 26, 2021
1 parent e4332c5 commit 9471b2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions importcheck/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@
import importlib.machinery
import importlib.util
import traceback
from io import StringIO
from typing import Any, Dict, Iterable, Iterator, List, Mapping, NamedTuple, Tuple, Union, cast

# 3rd party
import click
import toml
import dom_toml
from click.globals import resolve_color_default
from consolekit.terminal_colours import Back, Style
from domdf_python_tools.doctools import prettify_docstrings
Expand Down Expand Up @@ -92,7 +91,7 @@ def load_toml(filename: PathLike) -> ConfigDict:
:param filename:
"""

config = toml.loads(PathPlus(filename).read_text())
config = dom_toml.load(filename)

if "importcheck" in config:
return cast(ConfigDict, config["importcheck"])
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
click>=7.1.2
consolekit>=1.0.0
dom-toml>=0.2.2
domdf-python-tools>=2.7.0
packaging>=20.9
toml>=0.10.2
typing-extensions>=3.7.4.3

0 comments on commit 9471b2b

Please sign in to comment.