From 8760f9a0bd83a65ac6071d956bc05b051c9552fd Mon Sep 17 00:00:00 2001 From: Jake Beal Date: Thu, 11 Apr 2024 06:45:54 -0500 Subject: [PATCH 1/2] remove a couple of style errors to get tests passing again --- test/test_participation.py | 1 - test/test_style.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test_participation.py b/test/test_participation.py index 3ad5625..6d68715 100644 --- a/test/test_participation.py +++ b/test/test_participation.py @@ -17,7 +17,6 @@ def test_add_remove_role(self): self.assertEqual([sbol2.SO_PROMOTER, sbol2.SO_CDS], p.roles) def test_init_with_participant(self): - p = sbol2.Participation('p', participant='p1') self.assertEqual('p1', p.participant) diff --git a/test/test_style.py b/test/test_style.py index bf687ed..1999f0a 100644 --- a/test/test_style.py +++ b/test/test_style.py @@ -49,7 +49,7 @@ def test_wildcard_imports(self): if 'import' in line: if '*' in line and 'constants' not in line: msg = 'Wildcard import in {}: {}' - msg = msg.format(f, line) + _ = msg.format(f, line) # self.fail(msg) # print(msg) wildcard_count += 1 From 0f2442de6716818fac6dc4742cd02a413e22c3bf Mon Sep 17 00:00:00 2001 From: Jake Beal Date: Thu, 11 Apr 2024 06:58:56 -0500 Subject: [PATCH 2/2] actually, if statement can just be removed --- sbol2/property.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sbol2/property.py b/sbol2/property.py index e5536e6..5674c83 100644 --- a/sbol2/property.py +++ b/sbol2/property.py @@ -935,9 +935,8 @@ def __init__(self, property_owner, type_uri, reference_type_uri, super().__init__(property_owner, type_uri, lower_bound, upper_bound, validation_rules, initial_value) self.reference_type_uri = reference_type_uri - if self._sbol_owner is None: - property_store = [] - self._sbol_owner.properties[type_uri] = property_store + property_store = [] + self._sbol_owner.properties[type_uri] = property_store def get(self, item): """Return reference object at this index.