mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Make zip strict argument optional to support Python 3.9
This commit is contained in:
@@ -27,6 +27,7 @@ from ifcopenshell.util.shape_builder import ShapeBuilder, V
|
||||
from typing import Any, Optional, Literal, Union, overload
|
||||
|
||||
DATACLASS_SLOTS = {} if sys.version_info < (3, 10) else {"slots": True}
|
||||
ZIP_STRICT = {} if sys.version_info < (3, 10) else {"strict": True}
|
||||
|
||||
# SCHEMAS describe panels setup
|
||||
# where:
|
||||
@@ -168,7 +169,7 @@ def window_l_shape_check(
|
||||
"""`lining_thickness` and `lining_to_panel_offset_x` expected to be defined as a list,
|
||||
similarly to `create_ifc_window_frame_simple` `thickness` argument"""
|
||||
l_shape_check = lining_to_panel_offset_y_full < lining_depth and any(
|
||||
x_offset < th for th, x_offset in zip(lining_thickness, lining_to_panel_offset_x, strict=True)
|
||||
x_offset < th for th, x_offset in zip(lining_thickness, lining_to_panel_offset_x, **ZIP_STRICT)
|
||||
)
|
||||
return l_shape_check
|
||||
|
||||
@@ -210,7 +211,7 @@ def create_ifc_window(
|
||||
second_lining_size = lining_size.copy()
|
||||
second_lining_size[np_Y] = lining_size[np_Y] - lining_to_panel_offset_y_full
|
||||
second_lining_position = V(0, lining_to_panel_offset_y_full, 0)
|
||||
second_lining_thickness = [min(th, x_offset) for th, x_offset in zip(lining_thickness, x_offsets, strict=True)]
|
||||
second_lining_thickness = [min(th, x_offset) for th, x_offset in zip(lining_thickness, x_offsets, **ZIP_STRICT)]
|
||||
|
||||
second_lining_items = create_ifc_window_frame_simple(
|
||||
builder, second_lining_size, second_lining_thickness, second_lining_position
|
||||
|
||||
Reference in New Issue
Block a user