mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Fix ty-ios type-check errors (ifcopenshell-python side)
poe ty's sequence only reaches ty-ios once ty-bonsai passes, so these never surfaced until now: - util/alignment.py: drop the stale `include_referent=False` kwarg from add_zero_length_segment() - that parameter was removed from the function's signature in45ea5eb07but this caller in a different file was missed, leaving a latent TypeError if this code path is ever exercised. - ifcopenshell_wrapper.pyi: add the optional trailing `logger` parameter to parse_ifcxml/open/construct_iterator*, matching the real SWIG signatures in src/ifcwrap/*.i (all declare `Logger& logger = Logger::Root()`) that the hand-maintained stub never picked up. - ifcopenshell/__init__.py: remove a stale `ty: ignore[unknown-argument]` comment that ty confirms is no longer suppressing anything. - assign_cost_item_quantity.py: OPERATORS mixes 2-arg binary operators with the 1-arg `operator.neg` (for ast.USub), but FormulaEvaluator has no visit_UnaryOp so USub can never reach this lookup via visit_BinOp. Suppressed at the call site rather than touching the dict, since this looks like scaffolding for unary-minus support rather than dead code. - Explicit submodule imports (ifcopenshell.geom / api.alignment / util.unit / api.aggregate / api.context / api.spatial) added where accessed but only reachable by accident of import order. (cherry picked from commitd5e890bccd)
This commit is contained in:
committed by
Dion Moult
parent
17177d5f1c
commit
7036ea5c33
@@ -56,7 +56,7 @@ def append_zero_length_segments(file: ifcopenshell.file) -> ifcopenshell.file:
|
||||
for alignment in alignments:
|
||||
layouts = ifcopenshell.api.alignment.get_alignment_layouts(alignment)
|
||||
for layout in layouts:
|
||||
ifcopenshell.api.alignment.add_zero_length_segment(patched_file, layout, include_referent=False)
|
||||
ifcopenshell.api.alignment.add_zero_length_segment(patched_file, layout)
|
||||
curve = ifcopenshell.api.alignment.get_layout_curve(layout)
|
||||
if curve:
|
||||
ifcopenshell.api.alignment.add_zero_length_segment(patched_file, curve)
|
||||
|
||||
Reference in New Issue
Block a user