black, ruff

This commit is contained in:
Andrej730
2026-09-01 09:33:48 +05:00
parent b5670c4fc5
commit 0606a6100c
4 changed files with 6 additions and 10 deletions
@@ -18,7 +18,6 @@
import ifcopenshell
import ifcopenshell.api.aggregate
import ifcopenshell.api.alignment
import ifcopenshell.api.nest
from ifcopenshell import entity_instance
from ifcopenshell.api.alignment._add_zero_length_segment import _add_zero_length_segment
@@ -25,9 +25,7 @@ import ifcopenshell.util.alignment
from ifcopenshell import entity_instance
def create_from_csv(
file: ifcopenshell.file, filepath: str, start_station: Optional[float] = None
) -> entity_instance:
def create_from_csv(file: ifcopenshell.file, filepath: str, start_station: Optional[float] = None) -> entity_instance:
"""
Creates an alignment from PI data stored in a CSV file.
@@ -134,7 +134,8 @@ def test_add_stationing_referent_has_increasing_station():
file, "1+00.000", alignment, distance_along=0.0, station=100.0
)
assert (
ifcopenshell.util.element.get_pset(default_referent, name="Pset_Stationing", prop="HasIncreasingStation") is None
ifcopenshell.util.element.get_pset(default_referent, name="Pset_Stationing", prop="HasIncreasingStation")
is None
)
# explicit False (reverse stationing) is written
@@ -142,7 +143,8 @@ def test_add_stationing_referent_has_increasing_station():
file, "R", alignment, distance_along=0.0, station=100.0, has_increasing_station=False
)
assert (
ifcopenshell.util.element.get_pset(reverse_referent, name="Pset_Stationing", prop="HasIncreasingStation") is False
ifcopenshell.util.element.get_pset(reverse_referent, name="Pset_Stationing", prop="HasIncreasingStation")
is False
)
@@ -23,7 +23,6 @@ import ifcopenshell.api.alignment
import ifcopenshell.api.context
import ifcopenshell.api.unit
try:
ifcopenshell.file(schema="IFC4")
IFC4X3_AVAILABLE = True
@@ -56,9 +55,7 @@ def test_create():
# create() does not define stationing - the alignment has no referent nest at all
assert ifcopenshell.api.alignment.get_stationing_nest(file, ali) is None
assert not any(
related.is_a("IfcReferent") for nest in ali.IsNestedBy for related in nest.RelatedObjects
)
assert not any(related.is_a("IfcReferent") for nest in ali.IsNestedBy for related in nest.RelatedObjects)
# verify the geometric representation was created
curve = ifcopenshell.api.alignment.get_curve(ali)