Skip to content

Commit

Permalink
Switched from tomllib to tomlkit to support 3.8 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
ikollipara committed Oct 25, 2024
1 parent 65227b0 commit 08ac511
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions green/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
import pathlib # pragma: no cover
import sys # pragma: no cover
import tempfile # pragma: no cover
import tomllib
from textwrap import dedent # pragma: no cover
from typing import Callable, Sequence # pragma: no cover

import coverage # pragma: no cover
import tomlkit

coverage_version = f"Coverage {coverage.__version__}" # pragma: no cover

Expand Down Expand Up @@ -649,7 +649,7 @@ def getConfig( # pragma: no cover
if config_path.name == "setup.cfg":
parser.read(config_path)
elif config_path.name == "pyproject.toml":
data = tomllib.load(config_path.open("rb"))["tool"]
data = tomlkit.load(config_path.open("rb"))["tool"]
parser.read_dict(data, source="green")
else:
parser.read_file(ConfigFile(config_path))
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ coverage
lxml
setuptools
unidecode
tomlkit

0 comments on commit 08ac511

Please sign in to comment.