mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +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
@@ -249,7 +249,7 @@ def open(
|
||||
kwargs = {"mmap": mmap}
|
||||
if logger is not None:
|
||||
kwargs["logger"] = logger
|
||||
f = ifcopenshell_wrapper.open(str(path.absolute()), **kwargs) # ty: ignore[unknown-argument]
|
||||
f = ifcopenshell_wrapper.open(str(path.absolute()), **kwargs)
|
||||
else:
|
||||
f = ifcopenshell_wrapper.open(str(path.absolute()), False, *optional_logger_args(logger))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user