From b784cb06aee918f2e93041e17f9f89c67d0bbdaa Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 19 Dec 2025 18:15:30 +0500 Subject: [PATCH] Revert "Make zip strict argument optional to support Python 3.9" This reverts commit 3bdce4fbc3586f754d3ef431adc7804c06feea82. --- src/ifc4d/ifc4d/wpattern.py | 5 +---- .../ifcopenshell/api/geometry/add_window_representation.py | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/ifc4d/ifc4d/wpattern.py b/src/ifc4d/ifc4d/wpattern.py index cbadad53e0..2e434223d5 100644 --- a/src/ifc4d/ifc4d/wpattern.py +++ b/src/ifc4d/ifc4d/wpattern.py @@ -6,14 +6,11 @@ for each day as a key there is a list of working times with the format """ -import sys import re from datetime import time, datetime from typing import Any from ifc4d.common import WorkSlot -ZIP_STRICT = {} if sys.version_info < (3, 10) else {"strict": True} - class AstaCalendarWorkPattern: def get_keys(self, s: str) -> list[str]: @@ -123,7 +120,7 @@ class AstaCalendarWorkPattern: self.values = self.get_values(string) self.dict_wp: list[WorkSlot] = [] - for value, day_name in zip(self.values[1:], self.day_names, **ZIP_STRICT): + for value, day_name in zip(self.values[1:], self.day_names, strict=True): splt_data = value.strip().split(",") workhours: list[dict[str, Any]] = [] if len(splt_data) >= 7: diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py index 298ec18f70..6a1e487506 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py @@ -27,7 +27,6 @@ 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: @@ -169,7 +168,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, **ZIP_STRICT) + x_offset < th for th, x_offset in zip(lining_thickness, lining_to_panel_offset_x, strict=True) ) return l_shape_check @@ -211,7 +210,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, **ZIP_STRICT)] + second_lining_thickness = [min(th, x_offset) for th, x_offset in zip(lining_thickness, x_offsets, strict=True)] second_lining_items = create_ifc_window_frame_simple( builder, second_lining_size, second_lining_thickness, second_lining_position