Skip to content

Commit

Permalink
Allow Tomli v2 (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
hukkin committed Apr 10, 2022
1 parent 1146a73 commit 26533d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ python = "^3.6.1"
dataclasses = { version = ">=0.7,<0.9", python = "3.6" }
click = ">=7,<9"
rich = "^10.0.0"
tomli = "^1.0.0"
tomli = ">=1.0.0,<3.0.0"
pprintpp = "^0.4.0"
cucumber-tag-expressions = ">=2.0.0,<5.0.0"
click-default-group = "^1.2.2"
Expand Down
2 changes: 1 addition & 1 deletion ward/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def read_config_toml(project_root: Path, config_file: str) -> _ConfigDict:
return {}

try:
pyproject_toml = tomli.loads(path.read_text(encoding="utf-8"))
pyproject_toml = tomli.loads(path.read_bytes().decode())
except (tomli.TOMLDecodeError, OSError) as e:
raise click.FileError(
filename=config_file, hint=f"Error reading {config_file}:\n{e}"
Expand Down

0 comments on commit 26533d2

Please sign in to comment.