diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index 9d472d3b1d..fb38426aff 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -102,6 +102,7 @@ __all__ = [ "file", "guid", "ifcopenshell_wrapper", + "rocksdb_lazy_instance", "sqlite", "sqlite_entity", "stream", diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/__init__.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/__init__.py index 790125cb0b..2662015313 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/__init__.py @@ -125,4 +125,5 @@ __all__ = [ "name_segments", "register_referent_name_callback", "update_fallback_position", + "get_mapped_segments", ] diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py index 934e456b57..e24a946ae7 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py @@ -19,7 +19,6 @@ import numpy as np import ifcopenshell -import ifcopenshell.api import ifcopenshell.api.alignment import ifcopenshell.geom import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py index 999bf2f80f..70914a3353 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import math -from collections.abc import Sequence import numpy as np diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_zero_length_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_zero_length_segment.py index 00ac9d6000..71da0d3938 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_zero_length_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_zero_length_segment.py @@ -18,7 +18,6 @@ import ifcopenshell import ifcopenshell.api.alignment -import ifcopenshell.util import ifcopenshell.util.alignment from ifcopenshell import entity_instance from ifcopenshell.api.alignment._get_segment_start_point_label import ( diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_geometric_representation.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_geometric_representation.py index 30b91bb0a0..933ee3a470 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_geometric_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_geometric_representation.py @@ -16,8 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math -from collections.abc import Sequence import ifcopenshell import ifcopenshell.api.alignment diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_offset_curve_representation.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_offset_curve_representation.py index 31f0c583aa..6850013c96 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_offset_curve_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_offset_curve_representation.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math from collections.abc import Sequence import ifcopenshell diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_polyline_representation.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_polyline_representation.py index c745e6b9ac..4d31917fae 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_polyline_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_polyline_representation.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math from collections.abc import Sequence import ifcopenshell diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_cant_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_cant_segment.py index 27a781c505..2abd74c189 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_cant_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_cant_segment.py @@ -16,12 +16,8 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math -from collections.abc import Sequence -import ifcopenshell import ifcopenshell.api.alignment -import ifcopenshell.api.geometry from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_segment_start_point_label.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_segment_start_point_label.py index 34b30b9f59..6e5453489b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_segment_start_point_label.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_segment_start_point_label.py @@ -16,9 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from collections.abc import Sequence -import ifcopenshell from ifcopenshell import entity_instance _horizontal_callback = None diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_cant_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_cant_segment.py index e5b9ea0381..d7ae7526b4 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_cant_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_cant_segment.py @@ -21,7 +21,6 @@ from collections.abc import Sequence import ifcopenshell from ifcopenshell import entity_instance -from ifcopenshell.api.alignment import get_axis_subcontext def _get_axis(file: ifcopenshell.file, Ds: float, rail_head_distance: float) -> entity_instance: diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_horizontal_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_horizontal_segment.py index 17de77a7ad..0ab7d7334b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_horizontal_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_horizontal_segment.py @@ -21,7 +21,6 @@ from collections.abc import Sequence import ifcopenshell import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper -import ifcopenshell.util import ifcopenshell.util.unit from ifcopenshell import entity_instance from ifcopenshell.api.alignment._get_cant_segment import _get_cant_segment diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_vertical_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_vertical_segment.py index e47a50d5ce..707cf0cba1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_vertical_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_map_alignment_vertical_segment.py @@ -20,7 +20,7 @@ import math from collections.abc import Sequence import ifcopenshell -from ifcopenshell import entity_instance, ifcopenshell_wrapper +from ifcopenshell import entity_instance def _polynomial_length(A: float, B: float, C: float, L: float) -> float: diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_update_curve_segment_transition_code.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_update_curve_segment_transition_code.py index 5e1c2d0123..367bf2e2fd 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_update_curve_segment_transition_code.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_update_curve_segment_transition_code.py @@ -16,14 +16,9 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math -import numpy as np - -import ifcopenshell import ifcopenshell.api.alignment -import ifcopenshell.geom -from ifcopenshell import entity_instance, ifcopenshell_wrapper +from ifcopenshell import entity_instance def _update_curve_segment_transition_code(prev_segment: entity_instance, segment: entity_instance) -> None: diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py index bccc7b0213..2d70ace789 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py @@ -20,7 +20,6 @@ import numpy as np import ifcopenshell import ifcopenshell.api.alignment -import ifcopenshell.api.nest import ifcopenshell.api.pset import ifcopenshell.geom import ifcopenshell.guid diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_layout.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_layout.py index 41daef657c..09feb78a40 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_layout.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_layout.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.api import ifcopenshell.api.aggregate import ifcopenshell.api.alignment import ifcopenshell.api.geometry diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_offset_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_offset_curve.py index f4bc35773a..b24fb16b29 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_offset_curve.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_offset_curve.py @@ -20,9 +20,6 @@ from collections.abc import Sequence import ifcopenshell import ifcopenshell.api.aggregate -import ifcopenshell.api.alignment -import ifcopenshell.api.nest -import ifcopenshell.util.alignment from ifcopenshell import entity_instance from ifcopenshell.api.alignment._create_offset_curve_representation import ( _create_offset_curve_representation, diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_by_pi_method.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_by_pi_method.py index 09a0f0ecb6..e6ceba0572 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_by_pi_method.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_by_pi_method.py @@ -19,9 +19,7 @@ from collections.abc import Sequence import ifcopenshell -import ifcopenshell.api.aggregate import ifcopenshell.api.alignment -import ifcopenshell.api.nest from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_from_csv.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_from_csv.py index ce7192611c..3bd8ed275d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_from_csv.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_from_csv.py @@ -17,13 +17,10 @@ # along with IfcOpenShell. If not, see . import csv -from collections.abc import Sequence import ifcopenshell -import ifcopenshell.api import ifcopenshell.api.alignment from ifcopenshell import entity_instance -from ifcopenshell.api.alignment import get_axis_subcontext def create_from_csv(file: ifcopenshell.file, filepath: str) -> entity_instance: diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py index 6fd6876e08..52f329694b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math from typing import Union import numpy as np diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layout_nest.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layout_nest.py index b870fd1692..2a6287f6eb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layout_nest.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layout_nest.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py index 4b4a1a17d3..5e05cf1fe4 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py @@ -18,9 +18,6 @@ from collections.abc import Sequence -import ifcopenshell -import ifcopenshell.util -import ifcopenshell.util.representation from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_segment_nest.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_segment_nest.py index fba39617ea..4fc732ed0c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_segment_nest.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_segment_nest.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py index 0bf28746fe..7057640e02 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py @@ -16,8 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell -import ifcopenshell.util import ifcopenshell.util.representation from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py index ccc8f01214..db3a74b35b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py @@ -18,9 +18,6 @@ from collections.abc import Sequence -import ifcopenshell -import ifcopenshell.util -import ifcopenshell.util.element from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py index 6b1a7172d9..1bf320db60 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py @@ -16,8 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell -import ifcopenshell.util import ifcopenshell.util.representation from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve_segment_transition_code.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve_segment_transition_code.py index 6711935e6f..7fe4d30513 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve_segment_transition_code.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve_segment_transition_code.py @@ -16,12 +16,9 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math import numpy as np -import ifcopenshell -import ifcopenshell.api import ifcopenshell.geom from ifcopenshell import entity_instance, ifcopenshell_wrapper diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_curve.py index 0b5a70b127..4b26754ee8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_curve.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_curve.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell import ifcopenshell.api.alignment from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_segments.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_segments.py index 34cfd90a1d..758693081b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_segments.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_segments.py @@ -18,9 +18,6 @@ from collections.abc import Sequence -import ifcopenshell -import ifcopenshell.util -import ifcopenshell.util.element from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_mapped_segments.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_mapped_segments.py index 2e10aa9824..0b8a3b65b3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_mapped_segments.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_mapped_segments.py @@ -18,7 +18,6 @@ from collections.abc import Sequence -import ifcopenshell import ifcopenshell.api.alignment from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py index 333bfc01e5..d99d832fd2 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py @@ -16,9 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell -import ifcopenshell.util -import ifcopenshell.util.representation from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/has_zero_length_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/has_zero_length_segment.py index 036e4de59a..7daa9f23f1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/has_zero_length_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/has_zero_length_segment.py @@ -16,9 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell -import ifcopenshell.api.alignment -import ifcopenshell.util.element from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_horizontal_alignment_by_pi_method.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_horizontal_alignment_by_pi_method.py index ed157c3c90..676e03e429 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_horizontal_alignment_by_pi_method.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_horizontal_alignment_by_pi_method.py @@ -21,7 +21,6 @@ from collections.abc import Sequence import ifcopenshell import ifcopenshell.api.alignment -import ifcopenshell.util import ifcopenshell.util.unit from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/name_segments.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/name_segments.py index 6036332088..e010119b1a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/name_segments.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/name_segments.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py index 144311a3df..c36e635768 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py @@ -16,17 +16,11 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math import numpy as np import ifcopenshell -import ifcopenshell.api.alignment import ifcopenshell.geom -import ifcopenshell.guid -import ifcopenshell.template -import ifcopenshell.util -import ifcopenshell.util.alignment from ifcopenshell import entity_instance, ifcopenshell_wrapper diff --git a/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py b/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py index 2e679fd409..1f46e70921 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py +++ b/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import sys from types import EllipsisType from typing import Any, Union diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py index 6642e618b4..50cff83194 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py +++ b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Any, Union +from typing import Union import ifcopenshell import ifcopenshell.guid diff --git a/src/ifcopenshell-python/ifcopenshell/api/cogo/assign_survey_point.py b/src/ifcopenshell-python/ifcopenshell/api/cogo/assign_survey_point.py index be9e650ac7..5117998c6f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cogo/assign_survey_point.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cogo/assign_survey_point.py @@ -16,9 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import typing -import ifcopenshell from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/cogo/edit_survey_point.py b/src/ifcopenshell-python/ifcopenshell/api/cogo/edit_survey_point.py index 3c7d478441..1ee499e026 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cogo/edit_survey_point.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cogo/edit_survey_point.py @@ -16,9 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import typing -import ifcopenshell from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py b/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py index fc53e2ff3d..e37b597b3d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.cost -import ifcopenshell.util.date import ifcopenshell.util.resource diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value_formula.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value_formula.py index 213940904d..1fd46a41c3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value_formula.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value_formula.py @@ -21,8 +21,6 @@ from typing import Any import ifcopenshell import ifcopenshell.api.cost import ifcopenshell.util.cost -import ifcopenshell.util.element -import ifcopenshell.util.unit def edit_cost_value_formula(file: ifcopenshell.file, cost_value: ifcopenshell.entity_instance, formula: str) -> None: diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_representation.py index d77655a60c..0a1adb1ec1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_representation.py @@ -28,7 +28,7 @@ from mathutils import Matrix, Vector import ifcopenshell.util.shape_builder import ifcopenshell.util.unit -from ifcopenshell.util.shape_builder import VectorType, ifc_safe_vector_type +from ifcopenshell.util.shape_builder import ifc_safe_vector_type if TYPE_CHECKING: import bonsai.tool as tool diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_slab_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_slab_representation.py index d3a6daaad6..b5029dc934 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_slab_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_slab_representation.py @@ -17,7 +17,7 @@ # along with IfcOpenShell. If not, see . from math import cos, sin -from typing import Any, Optional, Union +from typing import Optional, Union import ifcopenshell.util.element import ifcopenshell.util.unit diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_wall_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_wall_representation.py index 12a033429d..69f9a82fa7 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_wall_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_wall_representation.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from math import cos, pi, sin +from math import cos, sin from typing import Any, Optional, Union import ifcopenshell.util.element diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/assign_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/assign_representation.py index 158f0152ac..a1e03ece8b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/assign_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/assign_representation.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Any import ifcopenshell.api.geometry import ifcopenshell.api.owner diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/disconnect_path.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/disconnect_path.py index 6e04a9df73..625bfd329c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/disconnect_path.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/disconnect_path.py @@ -19,7 +19,6 @@ from typing import Optional import ifcopenshell -import ifcopenshell.api import ifcopenshell.util.element diff --git a/src/ifcopenshell-python/ifcopenshell/api/grid/create_grid_axis.py b/src/ifcopenshell-python/ifcopenshell/api/grid/create_grid_axis.py index 7500ab1f55..da01050d92 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/grid/create_grid_axis.py +++ b/src/ifcopenshell-python/ifcopenshell/api/grid/create_grid_axis.py @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Literal, Optional +from typing import Literal import ifcopenshell diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py index cd61465326..a249106848 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py @@ -15,7 +15,6 @@ # # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Optional import ifcopenshell diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/unassign_layer.py b/src/ifcopenshell-python/ifcopenshell/api/layer/unassign_layer.py index 3eb0ed8fa1..1fc6b9762d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/layer/unassign_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/layer/unassign_layer.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.util.element def unassign_layer( diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py b/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py index debdded93a..7b144adb37 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py +++ b/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py @@ -17,8 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.util.date -import ifcopenshell.util.schema def add_library(file: ifcopenshell.file, name: str) -> ifcopenshell.entity_instance: diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py b/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py index 23a5a216b8..4ed83c6a92 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Any import ifcopenshell.util.representation diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py index 00a39a4120..e7e2542d12 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Any import ifcopenshell import ifcopenshell.api.owner diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py index 8387ecf871..e2869325d5 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Any, Optional, Union +from typing import Optional, Union import ifcopenshell.api import ifcopenshell.api.owner diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py b/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py index 7df304778a..0c29c70018 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py @@ -20,7 +20,6 @@ import time from typing import Union import ifcopenshell -import ifcopenshell.api import ifcopenshell.api.owner.settings import ifcopenshell.util.element diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/assign_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/assign_pset.py index eef7f6e8e9..908ffd9aad 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/assign_pset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/assign_pset.py @@ -21,7 +21,6 @@ from typing import Union import ifcopenshell import ifcopenshell.api.owner import ifcopenshell.guid -import ifcopenshell.util.element def assign_pset( diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/unassign_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/unassign_pset.py index 24256f77fe..e172f7fed1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/unassign_pset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/unassign_pset.py @@ -17,8 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.api.owner -import ifcopenshell.guid import ifcopenshell.util.element diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/unshare_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/unshare_pset.py index 051905b2b7..d272f98495 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/unshare_pset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/unshare_pset.py @@ -17,9 +17,7 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.api.owner import ifcopenshell.api.pset -import ifcopenshell.guid import ifcopenshell.util.element diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_usage.py b/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_usage.py index 24815d45e0..5c707fc5de 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_usage.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_usage.py @@ -16,12 +16,10 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math import ifcopenshell.api import ifcopenshell.util.constraint import ifcopenshell.util.date -import ifcopenshell.util.element import ifcopenshell.util.resource diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_work.py b/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_work.py index 0ec5f56fe4..fc597cce3a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_work.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_work.py @@ -18,8 +18,6 @@ import ifcopenshell.api.resource import ifcopenshell.util.constraint -import ifcopenshell.util.date -import ifcopenshell.util.element import ifcopenshell.util.resource diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py b/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py index 867f25f727..f8c0efb7bb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py +++ b/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Any import ifcopenshell import ifcopenshell.api.geometry @@ -25,7 +24,6 @@ import ifcopenshell.api.root import ifcopenshell.api.system import ifcopenshell.util.element import ifcopenshell.util.placement -import ifcopenshell.util.system def copy_class(file: ifcopenshell.file, product: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance: diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py b/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py index 6afe5ec3a6..3179884d80 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Any, Optional +from typing import Optional import ifcopenshell import ifcopenshell.api.owner diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py b/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py index c7971bc4f7..e8ed2b7173 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py +++ b/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py @@ -24,7 +24,6 @@ import ifcopenshell.api.geometry import ifcopenshell.api.pset import ifcopenshell.api.spatial import ifcopenshell.api.type -import ifcopenshell.guid import ifcopenshell.util.element import ifcopenshell.util.representation import ifcopenshell.util.schema diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py index 8a72d2044d..e10bc4ccb6 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from datetime import datetime, time, timedelta +from datetime import time from typing import Optional, Union import ifcopenshell.api diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/create_baseline.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/create_baseline.py index f70ead281f..5a53add448 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/create_baseline.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/create_baseline.py @@ -23,9 +23,7 @@ import ifcopenshell.api.control import ifcopenshell.api.owner import ifcopenshell.api.sequence import ifcopenshell.guid -import ifcopenshell.util.element import ifcopenshell.util.sequence -import ifcopenshell.util.system def create_baseline( diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/assign_structural_analysis_model.py b/src/ifcopenshell-python/ifcopenshell/api/structural/assign_structural_analysis_model.py index e378b3d984..01254d7985 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/structural/assign_structural_analysis_model.py +++ b/src/ifcopenshell-python/ifcopenshell/api/structural/assign_structural_analysis_model.py @@ -20,8 +20,6 @@ from typing import Union import ifcopenshell import ifcopenshell.api.group -import ifcopenshell.api.owner -import ifcopenshell.guid def assign_structural_analysis_model( diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_load_case.py b/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_load_case.py index 401db40dbc..6b381f81a1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_load_case.py +++ b/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_load_case.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.api import ifcopenshell.util.element diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_load_group.py b/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_load_group.py index 25acbbe9cc..26da2d157f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_load_group.py +++ b/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_load_group.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.api import ifcopenshell.util.element diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/unassign_structural_analysis_model.py b/src/ifcopenshell-python/ifcopenshell/api/structural/unassign_structural_analysis_model.py index 2053e7d075..fcb3a2ead3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/structural/unassign_structural_analysis_model.py +++ b/src/ifcopenshell-python/ifcopenshell/api/structural/unassign_structural_analysis_model.py @@ -18,8 +18,6 @@ import ifcopenshell import ifcopenshell.api.group -import ifcopenshell.api.owner -import ifcopenshell.util.element def unassign_structural_analysis_model( diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_textures.py b/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_textures.py index a0765bbf8d..49e1381da2 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_textures.py +++ b/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_textures.py @@ -20,7 +20,6 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Optional import ifcopenshell -import ifcopenshell.api if TYPE_CHECKING: import bpy diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py index 20e2ec26b8..5422695fe5 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Any import ifcopenshell import ifcopenshell.api.geometry diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py index 8ffbfcf380..7ae790e753 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell -import ifcopenshell.api import ifcopenshell.util.element diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/unassign_system.py b/src/ifcopenshell-python/ifcopenshell/api/system/unassign_system.py index 2921524094..725abc6fe3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/unassign_system.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/unassign_system.py @@ -18,7 +18,6 @@ import ifcopenshell import ifcopenshell.api.group -import ifcopenshell.util.element def unassign_system( diff --git a/src/ifcopenshell-python/ifcopenshell/api/type/map_type_representations.py b/src/ifcopenshell-python/ifcopenshell/api/type/map_type_representations.py index 0c4c66ae16..5e2f7de989 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/type/map_type_representations.py +++ b/src/ifcopenshell-python/ifcopenshell/api/type/map_type_representations.py @@ -18,7 +18,6 @@ import ifcopenshell import ifcopenshell.api.geometry -import ifcopenshell.util.element def map_type_representations( diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/add_derived_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/add_derived_unit.py index 5cd167e66d..2c308b42d9 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/add_derived_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/add_derived_unit.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -from typing import Any, Optional import ifcopenshell.util.unit diff --git a/src/ifcopenshell-python/ifcopenshell/draw.py b/src/ifcopenshell-python/ifcopenshell/draw.py index 15ad2ef11f..5f6d761ceb 100644 --- a/src/ifcopenshell-python/ifcopenshell/draw.py +++ b/src/ifcopenshell-python/ifcopenshell/draw.py @@ -670,7 +670,6 @@ def main( if __name__ == "__main__": import argparse - import sys import time times = [] diff --git a/src/ifcopenshell-python/ifcopenshell/geom/__init__.py b/src/ifcopenshell-python/ifcopenshell/geom/__init__.py index 604e5b8e37..9ed96fa0c8 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/__init__.py @@ -40,7 +40,7 @@ def _has_occ(): pass try: - import OCC.BRepTools + import OCC.BRepTools # noqa: F401 return True except ImportError: @@ -52,6 +52,6 @@ def _has_occ(): has_occ = _has_occ() if has_occ: - from . import occ_utils as utils + from . import occ_utils as utils # noqa: F401 from .main import * diff --git a/src/ifcopenshell-python/ifcopenshell/geom/app.py b/src/ifcopenshell-python/ifcopenshell/geom/app.py index 4ee0a5d482..fa07f3f2b8 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/app.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/app.py @@ -18,7 +18,6 @@ import functools import multiprocessing -import operator import os import sys import time @@ -26,11 +25,10 @@ import time import ifcopenshell.ifcopenshell_wrapper as W try: - from OCC.Core import AIS + from OCC.Core import AIS # noqa: F401 USE_OCCT_HANDLE = False except ImportError: - from OCC import AIS USE_OCCT_HANDLE = True @@ -56,7 +54,6 @@ from .code_editor_pane import code_edit try: from OCC.Display.pyqt5Display import qtViewer3d except BaseException: - import OCC.Display try: import OCC.Display.backend diff --git a/src/ifcopenshell-python/ifcopenshell/geom/code_editor_pane.py b/src/ifcopenshell-python/ifcopenshell/geom/code_editor_pane.py index ff46b67d8d..3e130debbc 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/code_editor_pane.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/code_editor_pane.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import logging -import os import sys from code import InteractiveConsole @@ -30,14 +29,11 @@ except BaseException: try: from pyqode.core import api, modes, panels - from pyqode.core.api import CodeEdit, ColorScheme - from pyqode.core.panels import CheckerPanel + from pyqode.core.api import CodeEdit from pyqode.python import modes as pymodes from pyqode.python import panels as pypanels - from pyqode.python import widgets from pyqode.python.backend import server - from pyqode.python.modes import PyAutoIndentMode, PythonSH - from pyqode.python.widgets import PyInteractiveConsole + from pyqode.python.modes import PythonSH has_pyqode = True except BaseException: diff --git a/src/ifcopenshell-python/ifcopenshell/geom/main.py b/src/ifcopenshell-python/ifcopenshell/geom/main.py index fe31a15d84..db6deecb15 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/main.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/main.py @@ -19,9 +19,6 @@ from __future__ import annotations -import operator -import os -import sys from collections.abc import Generator, Iterable from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union, cast, overload diff --git a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py index 9abddff470..8964b2392a 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py @@ -24,7 +24,7 @@ import operator import random import warnings from collections.abc import Iterable -from typing import Any, NamedTuple, Union +from typing import NamedTuple, Union import OCC from typing_extensions import assert_never diff --git a/src/ifcopenshell-python/ifcopenshell/util/doc.py b/src/ifcopenshell-python/ifcopenshell/util/doc.py index 9c7acf16b7..b0443f6117 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/doc.py +++ b/src/ifcopenshell-python/ifcopenshell/util/doc.py @@ -19,7 +19,7 @@ import copy import json from pathlib import Path -from typing import Any, Literal, Optional, TypedDict, Union +from typing import Optional, TypedDict, Union from typing_extensions import NotRequired diff --git a/src/ifcopenshell-python/ifcopenshell/util/generate_pset_templates.py b/src/ifcopenshell-python/ifcopenshell/util/generate_pset_templates.py index 87c65e2f28..681c074009 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/generate_pset_templates.py +++ b/src/ifcopenshell-python/ifcopenshell/util/generate_pset_templates.py @@ -30,7 +30,6 @@ import ifcopenshell.api.project import ifcopenshell.api.unit import ifcopenshell.guid import ifcopenshell.ifcopenshell_wrapper as W -import ifcopenshell.util.attribute if not RUN_FROM_DEV_REPO: import shutil diff --git a/src/ifcopenshell-python/ifcopenshell/util/selector.py b/src/ifcopenshell-python/ifcopenshell/util/selector.py index 72ff60c0a1..abcba23a0f 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/selector.py +++ b/src/ifcopenshell-python/ifcopenshell/util/selector.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import re -import sys from collections.abc import Iterable from decimal import Decimal from types import EllipsisType @@ -32,7 +31,6 @@ import ifcopenshell.util import ifcopenshell.util.attribute import ifcopenshell.util.classification import ifcopenshell.util.element -import ifcopenshell.util.fm import ifcopenshell.util.geolocation import ifcopenshell.util.placement import ifcopenshell.util.pset diff --git a/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py b/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py index 8c0f3d6ce9..4d6a822533 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py +++ b/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py @@ -18,7 +18,6 @@ from __future__ import annotations -import collections import collections.abc from collections.abc import Sequence from itertools import chain @@ -29,7 +28,6 @@ import numpy as np import numpy.typing as npt import ifcopenshell -import ifcopenshell.api import ifcopenshell.util.element import ifcopenshell.util.placement import ifcopenshell.util.representation diff --git a/src/ifcopenshell-python/ifcopenshell/util/unit.py b/src/ifcopenshell-python/ifcopenshell/util/unit.py index 93d4776df0..7e4686d4e4 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/unit.py +++ b/src/ifcopenshell-python/ifcopenshell/util/unit.py @@ -22,7 +22,6 @@ from math import pi from typing import Literal, Optional, Union import ifcopenshell -import ifcopenshell.api.unit import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper prefixes = { diff --git a/src/ifcopenshell-python/pyproject.toml b/src/ifcopenshell-python/pyproject.toml index 790891e350..9bcaeeebaa 100644 --- a/src/ifcopenshell-python/pyproject.toml +++ b/src/ifcopenshell-python/pyproject.toml @@ -45,3 +45,6 @@ include = ["ifcopenshell*"] [tool.ruff] extend = "../../pyproject.toml" +lint.select = [ + "F401", # unused imports +] diff --git a/src/ifcopenshell-python/test/api/alignment/test_add_segment_to_layout.py b/src/ifcopenshell-python/test/api/alignment/test_add_segment_to_layout.py index 9c6503516a..90a4d97d11 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_add_segment_to_layout.py +++ b/src/ifcopenshell-python/test/api/alignment/test_add_segment_to_layout.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_add_stationing_to_alignment.py b/src/ifcopenshell-python/test/api/alignment/test_add_stationing_to_alignment.py index 52786cb28c..4dd113ebbc 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_add_stationing_to_alignment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_add_stationing_to_alignment.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_add_vertical_alignment.py b/src/ifcopenshell-python/test/api/alignment/test_add_vertical_alignment.py index 50298717b3..5a09cd1890 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_add_vertical_alignment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_add_vertical_alignment.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_create.py b/src/ifcopenshell-python/test/api/alignment/test_create.py index e9fb2d00f3..f227bfd758 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_create_as_offset_curve.py b/src/ifcopenshell-python/test/api/alignment/test_create_as_offset_curve.py index 90321574bd..0b431163bc 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create_as_offset_curve.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create_as_offset_curve.py @@ -18,7 +18,6 @@ import math -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.unit diff --git a/src/ifcopenshell-python/test/api/alignment/test_create_as_polyline.py b/src/ifcopenshell-python/test/api/alignment/test_create_as_polyline.py index 8724de5e95..6e4eee9527 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create_as_polyline.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create_as_polyline.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.unit diff --git a/src/ifcopenshell-python/test/api/alignment/test_create_by_pi_method.py b/src/ifcopenshell-python/test/api/alignment/test_create_by_pi_method.py index 17a7d9b558..6da7af0690 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create_by_pi_method.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create_by_pi_method.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_create_layout_segment.py b/src/ifcopenshell-python/test/api/alignment/test_create_layout_segment.py index 87d1ca563f..ad654ac97d 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create_layout_segment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create_layout_segment.py @@ -18,7 +18,6 @@ import math -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_create_no_geometry.py b/src/ifcopenshell-python/test/api/alignment/test_create_no_geometry.py index a8f7c3ac06..20d5f946e8 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create_no_geometry.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create_no_geometry.py @@ -16,10 +16,8 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment -import ifcopenshell.api.context import ifcopenshell.api.unit diff --git a/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py b/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py index a7821ce213..9c7a8718e2 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_get_basis_curve.py b/src/ifcopenshell-python/test/api/alignment/test_get_basis_curve.py index 659b9db343..0743fa6fd7 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_get_basis_curve.py +++ b/src/ifcopenshell-python/test/api/alignment/test_get_basis_curve.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_horizontal_layout_by_pi_method.py b/src/ifcopenshell-python/test/api/alignment/test_horizontal_layout_by_pi_method.py index 75d46ba173..0864d5a67f 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_horizontal_layout_by_pi_method.py +++ b/src/ifcopenshell-python/test/api/alignment/test_horizontal_layout_by_pi_method.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_map_alignment_cant_segment.py b/src/ifcopenshell-python/test/api/alignment/test_map_alignment_cant_segment.py index 2f529fb08a..c3ec6c3831 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_map_alignment_cant_segment.py +++ b/src/ifcopenshell-python/test/api/alignment/test_map_alignment_cant_segment.py @@ -19,7 +19,6 @@ import pytest import ifcopenshell.api.alignment -import ifcopenshell.api.context from ifcopenshell.api.alignment._map_alignment_cant_segment import ( _map_alignment_cant_segment, ) diff --git a/src/ifcopenshell-python/test/api/alignment/test_name_segments.py b/src/ifcopenshell-python/test/api/alignment/test_name_segments.py index 20ed746ab0..2c9b8fa2ef 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_name_segments.py +++ b/src/ifcopenshell-python/test/api/alignment/test_name_segments.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_referent_names.py b/src/ifcopenshell-python/test/api/alignment/test_referent_names.py index d18ecf16c3..d64ea9a3ec 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_referent_names.py +++ b/src/ifcopenshell-python/test/api/alignment/test_referent_names.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import pytest -from pytest import fixture import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/alignment/test_update_curve_segment_transition_code.py b/src/ifcopenshell-python/test/api/alignment/test_update_curve_segment_transition_code.py index 30803b5a59..6fc87861db 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_update_curve_segment_transition_code.py +++ b/src/ifcopenshell-python/test/api/alignment/test_update_curve_segment_transition_code.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.context import ifcopenshell.api.unit diff --git a/src/ifcopenshell-python/test/api/alignment/test_vertical_layout_by_pi_method.py b/src/ifcopenshell-python/test/api/alignment/test_vertical_layout_by_pi_method.py index b34e22c741..bd97d644de 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_vertical_layout_by_pi_method.py +++ b/src/ifcopenshell-python/test/api/alignment/test_vertical_layout_by_pi_method.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.alignment import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/cogo/test_add_survey_point.py b/src/ifcopenshell-python/test/api/cogo/test_add_survey_point.py index 73d3c69105..143cb32c65 100644 --- a/src/ifcopenshell-python/test/api/cogo/test_add_survey_point.py +++ b/src/ifcopenshell-python/test/api/cogo/test_add_survey_point.py @@ -19,7 +19,6 @@ import pytest import ifcopenshell.api.aggregate -import ifcopenshell.api.alignment import ifcopenshell.api.cogo import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/cogo/test_assign_survey_point.py b/src/ifcopenshell-python/test/api/cogo/test_assign_survey_point.py index e19639166f..23a61c7655 100644 --- a/src/ifcopenshell-python/test/api/cogo/test_assign_survey_point.py +++ b/src/ifcopenshell-python/test/api/cogo/test_assign_survey_point.py @@ -19,7 +19,6 @@ import pytest import ifcopenshell.api.aggregate -import ifcopenshell.api.alignment import ifcopenshell.api.cogo import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/cogo/test_bearing2dd.py b/src/ifcopenshell-python/test/api/cogo/test_bearing2dd.py index 433a981ac7..199aa8a4e8 100644 --- a/src/ifcopenshell-python/test/api/cogo/test_bearing2dd.py +++ b/src/ifcopenshell-python/test/api/cogo/test_bearing2dd.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import math import pytest diff --git a/src/ifcopenshell-python/test/api/cogo/test_edit_survey_point.py b/src/ifcopenshell-python/test/api/cogo/test_edit_survey_point.py index 6b714b7342..cce8837475 100644 --- a/src/ifcopenshell-python/test/api/cogo/test_edit_survey_point.py +++ b/src/ifcopenshell-python/test/api/cogo/test_edit_survey_point.py @@ -19,7 +19,6 @@ import pytest import ifcopenshell.api.aggregate -import ifcopenshell.api.alignment import ifcopenshell.api.cogo import ifcopenshell.api.context diff --git a/src/ifcopenshell-python/test/api/cost/test_remove_cost_schedule.py b/src/ifcopenshell-python/test/api/cost/test_remove_cost_schedule.py index 5acadb9673..9b6c6824f1 100644 --- a/src/ifcopenshell-python/test/api/cost/test_remove_cost_schedule.py +++ b/src/ifcopenshell-python/test/api/cost/test_remove_cost_schedule.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell.api import ifcopenshell.api.cost import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/geometry/test_assign_representation.py b/src/ifcopenshell-python/test/api/geometry/test_assign_representation.py index ec02c7bc27..57fb48dabe 100644 --- a/src/ifcopenshell-python/test/api/geometry/test_assign_representation.py +++ b/src/ifcopenshell-python/test/api/geometry/test_assign_representation.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell.api import ifcopenshell.api.geometry import ifcopenshell.api.material import ifcopenshell.api.root diff --git a/src/ifcopenshell-python/test/api/geometry/test_unassign_representation.py b/src/ifcopenshell-python/test/api/geometry/test_unassign_representation.py index 55fbcaefe9..e44d802e23 100644 --- a/src/ifcopenshell-python/test/api/geometry/test_unassign_representation.py +++ b/src/ifcopenshell-python/test/api/geometry/test_unassign_representation.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.geometry -import ifcopenshell.util.placement import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/group/test_add_group.py b/src/ifcopenshell-python/test/api/group/test_add_group.py index 0c3547ce49..22eaac30c5 100644 --- a/src/ifcopenshell-python/test/api/group/test_add_group.py +++ b/src/ifcopenshell-python/test/api/group/test_add_group.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.group -import ifcopenshell.util.element import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/material/test_edit_profile_usage.py b/src/ifcopenshell-python/test/api/material/test_edit_profile_usage.py index 478c41eb55..ae4230d29f 100644 --- a/src/ifcopenshell-python/test/api/material/test_edit_profile_usage.py +++ b/src/ifcopenshell-python/test/api/material/test_edit_profile_usage.py @@ -20,7 +20,6 @@ import ifcopenshell.api.context import ifcopenshell.api.geometry import ifcopenshell.api.material import ifcopenshell.api.root -import ifcopenshell.util.placement import test.bootstrap from ifcopenshell.util.shape_builder import ShapeBuilder diff --git a/src/ifcopenshell-python/test/api/nest/test_assign_object.py b/src/ifcopenshell-python/test/api/nest/test_assign_object.py index 45c4d828e3..88f8d0bb90 100644 --- a/src/ifcopenshell-python/test/api/nest/test_assign_object.py +++ b/src/ifcopenshell-python/test/api/nest/test_assign_object.py @@ -21,7 +21,6 @@ import pytest import ifcopenshell.api.nest import ifcopenshell.api.root import ifcopenshell.util.element -import ifcopenshell.util.placement import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/project/test_append_asset.py b/src/ifcopenshell-python/test/api/project/test_append_asset.py index f89e4d5c89..949fc2fa5f 100644 --- a/src/ifcopenshell-python/test/api/project/test_append_asset.py +++ b/src/ifcopenshell-python/test/api/project/test_append_asset.py @@ -37,7 +37,6 @@ import ifcopenshell.api.unit import ifcopenshell.util.classification import ifcopenshell.util.element import ifcopenshell.util.placement -import ifcopenshell.util.unit import test.bootstrap from ifcopenshell.util.shape_builder import ShapeBuilder diff --git a/src/ifcopenshell-python/test/api/pset/test_assign_pset.py b/src/ifcopenshell-python/test/api/pset/test_assign_pset.py index e1234e8fe1..0685d1dbf0 100644 --- a/src/ifcopenshell-python/test/api/pset/test_assign_pset.py +++ b/src/ifcopenshell-python/test/api/pset/test_assign_pset.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.pset -import ifcopenshell.util.element import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/pset/test_unassign_pset.py b/src/ifcopenshell-python/test/api/pset/test_unassign_pset.py index 58c476d74a..3ee3e85328 100644 --- a/src/ifcopenshell-python/test/api/pset/test_unassign_pset.py +++ b/src/ifcopenshell-python/test/api/pset/test_unassign_pset.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.pset -import ifcopenshell.util.element import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/pset/test_unshare_pset.py b/src/ifcopenshell-python/test/api/pset/test_unshare_pset.py index 769294e1b5..76481b9170 100644 --- a/src/ifcopenshell-python/test/api/pset/test_unshare_pset.py +++ b/src/ifcopenshell-python/test/api/pset/test_unshare_pset.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.pset -import ifcopenshell.api.root import ifcopenshell.guid import ifcopenshell.util.element import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/resource/test_calculate_resource_work.py b/src/ifcopenshell-python/test/api/resource/test_calculate_resource_work.py index 6affa8a60f..a15947a544 100644 --- a/src/ifcopenshell-python/test/api/resource/test_calculate_resource_work.py +++ b/src/ifcopenshell-python/test/api/resource/test_calculate_resource_work.py @@ -20,7 +20,6 @@ import ifcopenshell.api.pset import ifcopenshell.api.resource import ifcopenshell.api.root import ifcopenshell.api.sequence -import ifcopenshell.util.constraint import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/root/test_copy_class.py b/src/ifcopenshell-python/test/api/root/test_copy_class.py index 77de023379..c8cf57c3f6 100644 --- a/src/ifcopenshell-python/test/api/root/test_copy_class.py +++ b/src/ifcopenshell-python/test/api/root/test_copy_class.py @@ -28,7 +28,6 @@ import ifcopenshell.api.spatial import ifcopenshell.api.system import ifcopenshell.api.type import ifcopenshell.api.unit -import ifcopenshell.util import ifcopenshell.util.system import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/sequence/test_remove_task.py b/src/ifcopenshell-python/test/api/sequence/test_remove_task.py index 1d1d3c1467..8395afe288 100644 --- a/src/ifcopenshell-python/test/api/sequence/test_remove_task.py +++ b/src/ifcopenshell-python/test/api/sequence/test_remove_task.py @@ -16,9 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest -import ifcopenshell.api import ifcopenshell.api.nest import ifcopenshell.api.sequence import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/sequence/test_remove_work_calendar.py b/src/ifcopenshell-python/test/api/sequence/test_remove_work_calendar.py index 42264d1182..cadf4770db 100644 --- a/src/ifcopenshell-python/test/api/sequence/test_remove_work_calendar.py +++ b/src/ifcopenshell-python/test/api/sequence/test_remove_work_calendar.py @@ -16,9 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest -import ifcopenshell.api import ifcopenshell.api.control import ifcopenshell.api.sequence import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/sequence/test_remove_work_plan.py b/src/ifcopenshell-python/test/api/sequence/test_remove_work_plan.py index 6f9a0ee9cf..906ea7a644 100644 --- a/src/ifcopenshell-python/test/api/sequence/test_remove_work_plan.py +++ b/src/ifcopenshell-python/test/api/sequence/test_remove_work_plan.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api import ifcopenshell.api.sequence diff --git a/src/ifcopenshell-python/test/api/sequence/test_remove_work_schedule.py b/src/ifcopenshell-python/test/api/sequence/test_remove_work_schedule.py index ea2b094364..02608e64f6 100644 --- a/src/ifcopenshell-python/test/api/sequence/test_remove_work_schedule.py +++ b/src/ifcopenshell-python/test/api/sequence/test_remove_work_schedule.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api import ifcopenshell.api.sequence diff --git a/src/ifcopenshell-python/test/api/sequence/test_remove_work_time.py b/src/ifcopenshell-python/test/api/sequence/test_remove_work_time.py index 30393c540b..207206f366 100644 --- a/src/ifcopenshell-python/test/api/sequence/test_remove_work_time.py +++ b/src/ifcopenshell-python/test/api/sequence/test_remove_work_time.py @@ -16,9 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest -import ifcopenshell.api import ifcopenshell.api.sequence import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/spatial/test_unassign_container.py b/src/ifcopenshell-python/test/api/spatial/test_unassign_container.py index efd89c990f..2a75a0c9df 100644 --- a/src/ifcopenshell-python/test/api/spatial/test_unassign_container.py +++ b/src/ifcopenshell-python/test/api/spatial/test_unassign_container.py @@ -19,7 +19,6 @@ import ifcopenshell.api.root import ifcopenshell.api.spatial import ifcopenshell.util.element -import ifcopenshell.util.placement import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/style/test_add_surface_textures.py b/src/ifcopenshell-python/test/api/style/test_add_surface_textures.py index 12c1711baa..aa7d011adc 100644 --- a/src/ifcopenshell-python/test/api/style/test_add_surface_textures.py +++ b/src/ifcopenshell-python/test/api/style/test_add_surface_textures.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.style import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/style/test_assign_material_style.py b/src/ifcopenshell-python/test/api/style/test_assign_material_style.py index 7b7ea3df56..40e82d7ac2 100644 --- a/src/ifcopenshell-python/test/api/style/test_assign_material_style.py +++ b/src/ifcopenshell-python/test/api/style/test_assign_material_style.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell import ifcopenshell.api.material import ifcopenshell.api.root import ifcopenshell.api.style diff --git a/src/ifcopenshell-python/test/api/style/test_assign_representation_styles.py b/src/ifcopenshell-python/test/api/style/test_assign_representation_styles.py index 157acf49da..0dbe2b51ad 100644 --- a/src/ifcopenshell-python/test/api/style/test_assign_representation_styles.py +++ b/src/ifcopenshell-python/test/api/style/test_assign_representation_styles.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell import ifcopenshell.api.root import ifcopenshell.api.style import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/style/test_remove_style.py b/src/ifcopenshell-python/test/api/style/test_remove_style.py index 5b39ec655c..04faee3b25 100644 --- a/src/ifcopenshell-python/test/api/style/test_remove_style.py +++ b/src/ifcopenshell-python/test/api/style/test_remove_style.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.material import ifcopenshell.api.style diff --git a/src/ifcopenshell-python/test/api/style/test_remove_surface_style.py b/src/ifcopenshell-python/test/api/style/test_remove_surface_style.py index 12ebf766f2..25affe54a4 100644 --- a/src/ifcopenshell-python/test/api/style/test_remove_surface_style.py +++ b/src/ifcopenshell-python/test/api/style/test_remove_surface_style.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.style import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/style/test_unassign_material_style.py b/src/ifcopenshell-python/test/api/style/test_unassign_material_style.py index 919f26e3c9..6a3fad0c20 100644 --- a/src/ifcopenshell-python/test/api/style/test_unassign_material_style.py +++ b/src/ifcopenshell-python/test/api/style/test_unassign_material_style.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell import ifcopenshell.api.material import ifcopenshell.api.root import ifcopenshell.api.style diff --git a/src/ifcopenshell-python/test/api/style/test_unassign_representation_styles.py b/src/ifcopenshell-python/test/api/style/test_unassign_representation_styles.py index ed7285b1de..45bf852947 100644 --- a/src/ifcopenshell-python/test/api/style/test_unassign_representation_styles.py +++ b/src/ifcopenshell-python/test/api/style/test_unassign_representation_styles.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell import ifcopenshell.api.root import ifcopenshell.api.style import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/system/test_connect_port.py b/src/ifcopenshell-python/test/api/system/test_connect_port.py index 06d1fb7f26..53975b5fd9 100644 --- a/src/ifcopenshell-python/test/api/system/test_connect_port.py +++ b/src/ifcopenshell-python/test/api/system/test_connect_port.py @@ -18,7 +18,6 @@ import ifcopenshell.api.root import ifcopenshell.api.system -import ifcopenshell.util.system import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/system/test_disconnect_port.py b/src/ifcopenshell-python/test/api/system/test_disconnect_port.py index 4d782414a6..1d711bdd2c 100644 --- a/src/ifcopenshell-python/test/api/system/test_disconnect_port.py +++ b/src/ifcopenshell-python/test/api/system/test_disconnect_port.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . import ifcopenshell.api.system -import ifcopenshell.util.system import test.bootstrap diff --git a/src/ifcopenshell-python/test/api/system/test_unassign_system.py b/src/ifcopenshell-python/test/api/system/test_unassign_system.py index 7e60cbb07c..3db260b5ab 100644 --- a/src/ifcopenshell-python/test/api/system/test_unassign_system.py +++ b/src/ifcopenshell-python/test/api/system/test_unassign_system.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.root import ifcopenshell.api.system diff --git a/src/ifcopenshell-python/test/api/test_api.py b/src/ifcopenshell-python/test/api/test_api.py index 55889cc627..7036f93528 100644 --- a/src/ifcopenshell-python/test/api/test_api.py +++ b/src/ifcopenshell-python/test/api/test_api.py @@ -17,13 +17,10 @@ # along with IfcOpenShell. If not, see . from datetime import datetime -from typing import Union -import ifcopenshell.api import ifcopenshell.api.control import ifcopenshell.api.cost import ifcopenshell.api.root -import ifcopenshell.api.sequence import ifcopenshell.util.element import test.bootstrap diff --git a/src/ifcopenshell-python/test/geom/geometry_tests.py b/src/ifcopenshell-python/test/geom/geometry_tests.py index f18cb3206a..744bf432fc 100644 --- a/src/ifcopenshell-python/test/geom/geometry_tests.py +++ b/src/ifcopenshell-python/test/geom/geometry_tests.py @@ -18,7 +18,6 @@ import numpy as np -import ifcopenshell import ifcopenshell.geom import ifcopenshell.util.shape import test.bootstrap diff --git a/src/ifcopenshell-python/test/geom/polyhedral_shapes.py b/src/ifcopenshell-python/test/geom/polyhedral_shapes.py index 07ed5bf6e6..c844c961e2 100644 --- a/src/ifcopenshell-python/test/geom/polyhedral_shapes.py +++ b/src/ifcopenshell-python/test/geom/polyhedral_shapes.py @@ -5,7 +5,6 @@ import pytest import ifcopenshell import ifcopenshell.geom -from test.bootstrap import file @pytest.mark.parametrize("file", ["geom/polygonal-face-tessellation.ifc"], indirect=True) diff --git a/src/ifcopenshell-python/test/geom/stats.py b/src/ifcopenshell-python/test/geom/stats.py index 9e2a9b2985..88f9b64345 100644 --- a/src/ifcopenshell-python/test/geom/stats.py +++ b/src/ifcopenshell-python/test/geom/stats.py @@ -2,7 +2,6 @@ import os import pytest -import ifcopenshell from ifcopenshell.geom.stats import StatsCollector diff --git a/src/ifcopenshell-python/test/test_entity_instance.py b/src/ifcopenshell-python/test/test_entity_instance.py index c031796b9f..cf4c050320 100644 --- a/src/ifcopenshell-python/test/test_entity_instance.py +++ b/src/ifcopenshell-python/test/test_entity_instance.py @@ -16,11 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest -import ifcopenshell -import ifcopenshell.api -import ifcopenshell.util.element import test.bootstrap diff --git a/src/ifcopenshell-python/test/test_file.py b/src/ifcopenshell-python/test/test_file.py index 062ef88b9f..c2c0aa54ea 100644 --- a/src/ifcopenshell-python/test/test_file.py +++ b/src/ifcopenshell-python/test/test_file.py @@ -19,8 +19,6 @@ import pytest import ifcopenshell -import ifcopenshell.api -import ifcopenshell.util.element import test.bootstrap diff --git a/src/ifcopenshell-python/test/test_file_inverse.py b/src/ifcopenshell-python/test/test_file_inverse.py index d1708bc2bb..af2e0d8a31 100644 --- a/src/ifcopenshell-python/test/test_file_inverse.py +++ b/src/ifcopenshell-python/test/test_file_inverse.py @@ -1,13 +1,6 @@ -import gc -import itertools -import pprint -import sys -import weakref - import pytest import ifcopenshell -import ifcopenshell.api def test_inverse_indices(): diff --git a/src/ifcopenshell-python/test/test_sql.py b/src/ifcopenshell-python/test/test_sql.py index d0f11792c4..39cf4c2583 100644 --- a/src/ifcopenshell-python/test/test_sql.py +++ b/src/ifcopenshell-python/test/test_sql.py @@ -19,7 +19,6 @@ import tempfile from pathlib import Path -import ifcpatch from ifcpatch.recipes import Ifc2Sql import ifcopenshell diff --git a/src/ifcopenshell-python/test/test_stream.py b/src/ifcopenshell-python/test/test_stream.py index c463c3ccca..20fe67e5ec 100644 --- a/src/ifcopenshell-python/test/test_stream.py +++ b/src/ifcopenshell-python/test/test_stream.py @@ -18,10 +18,8 @@ from pathlib import Path -import pytest import ifcopenshell -import test.bootstrap TEST_FILE = Path(__file__).parent / "files" / "basic.ifc" diff --git a/src/ifcopenshell-python/test/test_validate_rocksdb.py b/src/ifcopenshell-python/test/test_validate_rocksdb.py index 6cfde4fddd..64c010938b 100644 --- a/src/ifcopenshell-python/test/test_validate_rocksdb.py +++ b/src/ifcopenshell-python/test/test_validate_rocksdb.py @@ -19,7 +19,6 @@ import glob import os import tempfile -import time import pytest diff --git a/src/ifcopenshell-python/test/test_wall_opening.py b/src/ifcopenshell-python/test/test_wall_opening.py index 812a5420e2..a08ff445be 100644 --- a/src/ifcopenshell-python/test/test_wall_opening.py +++ b/src/ifcopenshell-python/test/test_wall_opening.py @@ -27,7 +27,6 @@ from dataclasses import dataclass, field import pytest -import ifcopenshell import ifcopenshell.guid import ifcopenshell.template diff --git a/src/ifcopenshell-python/test/util/scripts/test_validate_stub.py b/src/ifcopenshell-python/test/util/scripts/test_validate_stub.py index 82b9e02adc..a4a0b1ecbc 100644 --- a/src/ifcopenshell-python/test/util/scripts/test_validate_stub.py +++ b/src/ifcopenshell-python/test/util/scripts/test_validate_stub.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.util.scripts.validate_stub as subject diff --git a/src/ifcopenshell-python/test/util/test_attribute.py b/src/ifcopenshell-python/test/util/test_attribute.py index 4b04e8a678..c3d882dc72 100644 --- a/src/ifcopenshell-python/test/util/test_attribute.py +++ b/src/ifcopenshell-python/test/util/test_attribute.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell import ifcopenshell.ifcopenshell_wrapper as W diff --git a/src/ifcopenshell-python/test/util/test_brick.py b/src/ifcopenshell-python/test/util/test_brick.py index d0cffeaba9..88302a2170 100644 --- a/src/ifcopenshell-python/test/util/test_brick.py +++ b/src/ifcopenshell-python/test/util/test_brick.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.api.root import ifcopenshell.api.type diff --git a/src/ifcopenshell-python/test/util/test_date.py b/src/ifcopenshell-python/test/util/test_date.py index dd47244ba7..9b1713a772 100644 --- a/src/ifcopenshell-python/test/util/test_date.py +++ b/src/ifcopenshell-python/test/util/test_date.py @@ -16,10 +16,8 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest import ifcopenshell.util.date as subject -import test.bootstrap class TestReadableIFCDuration: diff --git a/src/ifcopenshell-python/test/util/test_file.py b/src/ifcopenshell-python/test/util/test_file.py index b7b34cd097..a1ee333b6b 100644 --- a/src/ifcopenshell-python/test/util/test_file.py +++ b/src/ifcopenshell-python/test/util/test_file.py @@ -20,7 +20,6 @@ import tempfile import zipfile from pathlib import Path -import pytest import ifcopenshell.util.file as subject import test.bootstrap diff --git a/src/ifcopenshell-python/test/util/test_placement.py b/src/ifcopenshell-python/test/util/test_placement.py index 8a26c52ee5..bd611db36b 100644 --- a/src/ifcopenshell-python/test/util/test_placement.py +++ b/src/ifcopenshell-python/test/util/test_placement.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import ifcopenshell import ifcopenshell.util.placement as subject import test.bootstrap diff --git a/src/ifcopenshell-python/test/util/test_pset.py b/src/ifcopenshell-python/test/util/test_pset.py index ccfbcc4970..3b44951ec4 100644 --- a/src/ifcopenshell-python/test/util/test_pset.py +++ b/src/ifcopenshell-python/test/util/test_pset.py @@ -17,7 +17,6 @@ # along with IfcOpenShell. If not, see . """Run this test from src/ifcopenshell-python folder: pytest --durations=0 ifcopenshell/util/test_pset.py""" -from ifcopenshell import util from ifcopenshell.util import pset from ifcopenshell.util.pset import ApplicableEntity diff --git a/src/ifcopenshell-python/test/util/test_selector.py b/src/ifcopenshell-python/test/util/test_selector.py index e4de678529..0b90f3b278 100644 --- a/src/ifcopenshell-python/test/util/test_selector.py +++ b/src/ifcopenshell-python/test/util/test_selector.py @@ -26,13 +26,11 @@ import ifcopenshell.api.group import ifcopenshell.api.material import ifcopenshell.api.pset import ifcopenshell.api.root -import ifcopenshell.api.sequence import ifcopenshell.api.spatial import ifcopenshell.api.type import ifcopenshell.api.unit import ifcopenshell.util.element import ifcopenshell.util.placement -import ifcopenshell.util.pset import ifcopenshell.util.selector as subject import test.bootstrap diff --git a/src/ifcopenshell-python/test/util/test_shape_builder.py b/src/ifcopenshell-python/test/util/test_shape_builder.py index 87499b3288..5ff8adc03f 100644 --- a/src/ifcopenshell-python/test/util/test_shape_builder.py +++ b/src/ifcopenshell-python/test/util/test_shape_builder.py @@ -22,9 +22,7 @@ from typing import Any, Union import numpy as np import pytest -import ifcopenshell.api import ifcopenshell.geom -import ifcopenshell.util import ifcopenshell.util.shape import test.bootstrap from ifcopenshell.util.shape_builder import ( diff --git a/src/ifcopenshell-python/test/util/test_type.py b/src/ifcopenshell-python/test/util/test_type.py index 54f0e6da16..dfc16e3446 100644 --- a/src/ifcopenshell-python/test/util/test_type.py +++ b/src/ifcopenshell-python/test/util/test_type.py @@ -16,9 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import pytest -import ifcopenshell.api import ifcopenshell.util.type as subject import test.bootstrap