Skip to content

Commit

Permalink
fix: Support parsing inline-table format of Poetry dependency spec
Browse files Browse the repository at this point in the history
  • Loading branch information
rlad78 committed May 2, 2024
1 parent 40eec08 commit 94e3e58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ def is_truthy(arg):
with open("pyproject.toml", "r", encoding="utf8") as pyproject:
parsed_toml = toml.load(pyproject)

NAUTOBOT_VERSION = parsed_toml["tool"]["poetry"]["dependencies"]["nautobot"]
try:
NAUTOBOT_VERSION = parsed_toml["tool"]["poetry"]["dependencies"]["nautobot"]["version"]
except TypeError:
NAUTOBOT_VERSION = parsed_toml["tool"]["poetry"]["dependencies"]["nautobot"]


def task(function=None, *args, **kwargs): # pylint: disable=keyword-arg-before-vararg
Expand Down

0 comments on commit 94e3e58

Please sign in to comment.