ifcopenshell-python - clean up unused imports

This commit is contained in:
Andrej730
2026-01-16 16:55:56 +05:00
parent 233ad63bca
commit dfc91e6639
156 changed files with 22 additions and 233 deletions
@@ -125,4 +125,5 @@ __all__ = [
"name_segments",
"register_referent_name_callback",
"update_fallback_position",
"get_mapped_segments",
]
@@ -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
@@ -17,7 +17,6 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import math
from collections.abc import Sequence
import numpy as np
@@ -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 (
@@ -16,8 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import math
from collections.abc import Sequence
import ifcopenshell
import ifcopenshell.api.alignment
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import math
from collections.abc import Sequence
import ifcopenshell
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import math
from collections.abc import Sequence
import ifcopenshell
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import math
from collections.abc import Sequence
import ifcopenshell
import ifcopenshell.api.alignment
import ifcopenshell.api.geometry
from ifcopenshell import entity_instance
@@ -16,9 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from collections.abc import Sequence
import ifcopenshell
from ifcopenshell import entity_instance
_horizontal_callback = None
@@ -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:
@@ -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
@@ -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:
@@ -16,14 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
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:
@@ -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
@@ -17,7 +17,6 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.alignment
import ifcopenshell.api.geometry
@@ -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,
@@ -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
@@ -17,13 +17,10 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
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:
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import math
from typing import Union
import numpy as np
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
from ifcopenshell import entity_instance
@@ -18,9 +18,6 @@
from collections.abc import Sequence
import ifcopenshell
import ifcopenshell.util
import ifcopenshell.util.representation
from ifcopenshell import entity_instance
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
from ifcopenshell import entity_instance
@@ -16,8 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.util
import ifcopenshell.util.representation
from ifcopenshell import entity_instance
@@ -18,9 +18,6 @@
from collections.abc import Sequence
import ifcopenshell
import ifcopenshell.util
import ifcopenshell.util.element
from ifcopenshell import entity_instance
@@ -16,8 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.util
import ifcopenshell.util.representation
from ifcopenshell import entity_instance
@@ -16,12 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import math
import numpy as np
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.geom
from ifcopenshell import entity_instance, ifcopenshell_wrapper
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api.alignment
from ifcopenshell import entity_instance
@@ -18,9 +18,6 @@
from collections.abc import Sequence
import ifcopenshell
import ifcopenshell.util
import ifcopenshell.util.element
from ifcopenshell import entity_instance
@@ -18,7 +18,6 @@
from collections.abc import Sequence
import ifcopenshell
import ifcopenshell.api.alignment
from ifcopenshell import entity_instance
@@ -16,9 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.util
import ifcopenshell.util.representation
from ifcopenshell import entity_instance
@@ -16,9 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api.alignment
import ifcopenshell.util.element
from ifcopenshell import entity_instance
@@ -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
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
from ifcopenshell import entity_instance
@@ -16,17 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
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
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import sys
from types import EllipsisType
from typing import Any, Union
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Any, Union
from typing import Union
import ifcopenshell
import ifcopenshell.guid
@@ -16,9 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import typing
import ifcopenshell
from ifcopenshell import entity_instance
@@ -16,9 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import typing
import ifcopenshell
from ifcopenshell import entity_instance
@@ -17,7 +17,6 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell.api.cost
import ifcopenshell.util.date
import ifcopenshell.util.resource
@@ -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:
@@ -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
@@ -17,7 +17,7 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from math import cos, sin
from typing import Any, Optional, Union
from typing import Optional, Union
import ifcopenshell.util.element
import ifcopenshell.util.unit
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from math import cos, pi, sin
from math import cos, sin
from typing import Any, Optional, Union
import ifcopenshell.util.element
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Any
import ifcopenshell.api.geometry
import ifcopenshell.api.owner
@@ -19,7 +19,6 @@
from typing import Optional
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.element
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Literal, Optional
from typing import Literal
import ifcopenshell
@@ -15,7 +15,6 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Optional
import ifcopenshell
@@ -17,7 +17,6 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.util.element
def unassign_layer(
@@ -17,8 +17,6 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.util.date
import ifcopenshell.util.schema
def add_library(file: ifcopenshell.file, name: str) -> ifcopenshell.entity_instance:
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Any
import ifcopenshell.util.representation
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Any
import ifcopenshell
import ifcopenshell.api.owner
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Any, Optional, Union
from typing import Optional, Union
import ifcopenshell.api
import ifcopenshell.api.owner
@@ -20,7 +20,6 @@ import time
from typing import Union
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.owner.settings
import ifcopenshell.util.element
@@ -21,7 +21,6 @@ from typing import Union
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
def assign_pset(
@@ -17,8 +17,6 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
@@ -17,9 +17,7 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.api.pset
import ifcopenshell.guid
import ifcopenshell.util.element
@@ -16,12 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import math
import ifcopenshell.api
import ifcopenshell.util.constraint
import ifcopenshell.util.date
import ifcopenshell.util.element
import ifcopenshell.util.resource
@@ -18,8 +18,6 @@
import ifcopenshell.api.resource
import ifcopenshell.util.constraint
import ifcopenshell.util.date
import ifcopenshell.util.element
import ifcopenshell.util.resource
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
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:
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Any, Optional
from typing import Optional
import ifcopenshell
import ifcopenshell.api.owner
@@ -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
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from datetime import datetime, time, timedelta
from datetime import time
from typing import Optional, Union
import ifcopenshell.api
@@ -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(
@@ -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(
@@ -17,7 +17,6 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.element
@@ -17,7 +17,6 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.element
@@ -18,8 +18,6 @@
import ifcopenshell
import ifcopenshell.api.group
import ifcopenshell.api.owner
import ifcopenshell.util.element
def unassign_structural_analysis_model(
@@ -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
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Any
import ifcopenshell
import ifcopenshell.api.geometry
@@ -17,7 +17,6 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.element
@@ -18,7 +18,6 @@
import ifcopenshell
import ifcopenshell.api.group
import ifcopenshell.util.element
def unassign_system(
@@ -18,7 +18,6 @@
import ifcopenshell
import ifcopenshell.api.geometry
import ifcopenshell.util.element
def map_type_representations(
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
from typing import Any, Optional
import ifcopenshell.util.unit