mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Fix RUF015 (next() instead of list comprehensions[0])
https://docs.astral.sh/ruff/rules/-iterable-allocation-for-first-element/
This commit is contained in:
@@ -177,9 +177,9 @@ class TestRemoveRelation(NewFile):
|
||||
def test_run(self):
|
||||
TestAddRelation().test_run()
|
||||
assert BrickStore.graph
|
||||
source, relation, destination = list(
|
||||
BrickStore.graph.triples((None, URIRef("https://brickschema.org/schema/Brick#feeds"), None))
|
||||
)[0]
|
||||
source, relation, destination = next(
|
||||
iter(BrickStore.graph.triples((None, URIRef("https://brickschema.org/schema/Brick#feeds"), None)))
|
||||
)
|
||||
subject.remove_relation(source, relation, destination)
|
||||
assert not list(
|
||||
BrickStore.graph.triples(
|
||||
|
||||
Reference in New Issue
Block a user