summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Helmert III <ajak@gentoo.org>2023-12-25 15:07:57 -0800
committerJohn Helmert III <ajak@gentoo.org>2023-12-25 15:21:37 -0800
commit9285344062d950809c6f57683bf56752e4ebfa2a (patch)
tree55aa4e7c34870e31bf69592bf4971128ce8ece13
parentautoglsa: previous_glsa(): avoid returning None for typing (diff)
downloadglsamaker-9285344062d950809c6f57683bf56752e4ebfa2a.tar.gz
glsamaker-9285344062d950809c6f57683bf56752e4ebfa2a.tar.bz2
glsamaker-9285344062d950809c6f57683bf56752e4ebfa2a.zip
autoglsa: switch Relationship column assignments to appends
This prevents a few type-clashing issues on assignment: glsamaker/autoglsa.py:253: error: Incompatible types in assignment (expression has type "list[Any]", variable has type "RelationshipProperty[Any]") [assignment] glsamaker/autoglsa.py:260: error: Incompatible types in assignment (expression has type "list[Any]", variable has type "RelationshipProperty[Any]") [assignment] glsamaker/autoglsa.py:270: error: Incompatible types in assignment (expression has type "list[Affected]", variable has type "RelationshipProperty[Any]") [assignment] Signed-off-by: John Helmert III <ajak@gentoo.org>
-rw-r--r--glsamaker/autoglsa.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/glsamaker/autoglsa.py b/glsamaker/autoglsa.py
index 82de370..06d2b40 100644
--- a/glsamaker/autoglsa.py
+++ b/glsamaker/autoglsa.py
@@ -250,9 +250,9 @@ def autogenerate_glsa(bugs: list[BugzillaBug]) -> Tuple[GLSA, list[NoAtomInSumma
packages, errors = get_max_versions(bugs)
- glsa.bugs = [Bug.new(str(bug.id)) for bug in bugs]
+ glsa.bugs += [Bug.new(str(bug.id)) for bug in bugs]
aliases = bugs_aliases([bug.bug_id for bug in glsa.bugs])
- glsa.references = [Reference.new(alias) for alias in aliases]
+ glsa.references += [Reference.new(alias) for alias in aliases]
glsa.impact_type = glsa_impact(bugs)
glsa.workaround = "There is no known workaround at this time."
@@ -262,7 +262,7 @@ def autogenerate_glsa(bugs: list[BugzillaBug]) -> Tuple[GLSA, list[NoAtomInSumma
)
if packages:
- glsa.affected = generate_affected(packages)
+ glsa.affected.append(generate_affected(packages))
try:
# These are somewhat more speculative than the previous
last = previous_glsa(str(packages[0].unversioned_atom))