diff --git a/tbump/config.py b/tbump/config.py index 1e065bc..b97c712 100644 --- a/tbump/config.py +++ b/tbump/config.py @@ -106,11 +106,11 @@ def __init__(self, path: Path, doc: TOMLDocument): def get_parsed(self) -> dict: try: - tool_section = self.doc["tool"]["tbump"].value # type: ignore[index] + tool_section = self.doc.unwrap()["tool"]["tbump"] # type: ignore[index] except KeyError as e: raise InvalidConfig(parse_error=e) - return tool_section.value # type: ignore[no-any-return, union-attr] + return tool_section # type: ignore[no-any-return, union-attr] def set_new_version(self, new_version: str) -> None: self.doc["tool"]["tbump"]["version"]["current"] = new_version # type: ignore[index]