bugfix: fix extra dependency annotations

These were being displayed regardless of the dep type
and state of DepDesc. This is fixed with this commit.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-07-27 22:03:38 -07:00
parent 88569b6d09
commit 04d1c81d3d
3 changed files with 16 additions and 3 deletions

View file

@ -46,6 +46,8 @@ def dep_extra(dep: PackageDependency) -> str:
@register_filter("dep_extra_desc")
def dep_extra_desc(dep: PackageDependency) -> str:
extra = dep_extra(dep)
if not dep.DepDesc:
return extra
return extra + f" {dep.DepDesc}"