mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
Revert "Make zip strict argument optional to support Python 3.9"
This reverts commit 3bdce4fbc3.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user