Skip to content

Commit

Permalink
chore(dev-deps): use tomli (#685)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck authored Sep 23, 2024
1 parent 0ac84d7 commit 733ba0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pep8-naming = "0.14.1"
isort = "5.13.2"
autopep8 = "2.3.1"
mypy = "1.11.2"
toml = { version="0.10.2", python="<3.11"}
tomli = { version = "2.0.1", python = "<3.11" }
tox = "4.20.0"
xmldiff = "2.7.0"
bandit = "1.7.9"
Expand Down
8 changes: 3 additions & 5 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,7 @@ def __name__(self) -> str:
def load_pyproject() -> Dict[str, Any]:
if sys.version_info >= (3, 11):
from tomllib import load as toml_load
with open(path.join(path.dirname(__file__), '..', 'pyproject.toml'), 'rb') as f:
return toml_load(f)
else:
from toml import load as toml_load
with open(path.join(path.dirname(__file__), '..', 'pyproject.toml'), 'rt') as f:
return toml_load(f)
from tomli import load as toml_load
with open(path.join(path.dirname(__file__), '..', 'pyproject.toml'), 'rb') as f:
return toml_load(f)

0 comments on commit 733ba0e

Please sign in to comment.