Skip to content

Commit

Permalink
Fixed issue regarding TOML types.
Browse files Browse the repository at this point in the history
- `tomlkit.parse()` returns a `TOMLDocument`.
- `unwrap()` converts it into a `dict`
  • Loading branch information
coordt committed Jun 19, 2023
1 parent 9f14ff7 commit 8960d24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bumpversion/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def read_toml_file(file_path: Path) -> Dict[str, Any]:
import tomlkit

# Load the TOML file
toml_data = tomlkit.parse(file_path.read_text())
toml_data = tomlkit.parse(file_path.read_text()).unwrap()

return toml_data.get("tool", {}).get("bumpversion", {})

Expand Down

0 comments on commit 8960d24

Please sign in to comment.