Use the toml library instead

It was already be installed by `black`.
This commit is contained in:
MinchinWeb 2020-04-06 21:21:43 -06:00
parent ad7cf5378a
commit 9a94b08a32
3 changed files with 4 additions and 16 deletions

View file

@ -20,7 +20,7 @@ import tzlocal
import shlex
import sys
from pathlib import Path
import tomlkit
import toml
consts = pdt.Constants(usePyICU=False)
consts.DOWParseStyle = -1 # Prefers past weekdays
@ -213,7 +213,7 @@ def check_output_time_inline(context, text):
def check_output_version_inline(context):
out = context.stdout_capture.getvalue()
pyproject = (Path(__file__) / '..' / '..' / '..' / 'pyproject.toml').resolve()
pyproject_contents = tomlkit.parse(pyproject.open().read())
pyproject_contents = toml.load(pyproject)
pyproject_version = pyproject_contents['tool']['poetry']['version']
assert pyproject_version in out, pyproject_version