Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sbol3/toplevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import copy
import math
import posixpath
import typing
import urllib.parse
import uuid
import warnings
from typing import Dict, Callable, Optional, Any
import typing
from typing import Any, Callable, Dict, Optional

from . import *
from .typing import *
Expand Down Expand Up @@ -234,8 +234,8 @@ def update_references_traverser(x):
if v.property_uri not in x._properties:
continue
items = x._properties[v.property_uri]
for i in range(len(items)):
str_item = str(items[i])
for i, item in enumerate(items):
str_item = str(item)
if str_item in identity_map:
new_reference = identity_map[str_item].identity
# The item is probably an rdflib.URIRef. We take
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ disable = abstract-class-instantiated,
implicit-str-concat,
import-outside-toplevel,
logging-not-lazy,
consider-using-enumerate,
consider-using-f-string,
cyclic-import,
duplicate-code,
Expand Down
3 changes: 1 addition & 2 deletions test/test_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ def test_cloning_references(self):
doc2 = sbol3.Document()
doc2.add(toggle_clone)
self.assertEqual(len(toggle.constraints), len(toggle_clone.constraints))
for i in range(len(toggle.constraints)):
c = toggle.constraints[i]
for i, c in enumerate(toggle.constraints):
c_clone = toggle_clone.constraints[i]
self.assertNotEqual(c.identity, c_clone.identity)
s = c.subject.lookup()
Expand Down