Skip to content

Commit

Permalink
fix Unable to parse the pyproject.toml file. your-tools#156
Browse files Browse the repository at this point in the history
  • Loading branch information
vipcxj committed Jan 12, 2023
1 parent 550a449 commit 2f5a91f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tbump/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2f5a91f

Please sign in to comment.