diff --git a/.github/workflows/check_repo_ci_jobs.py b/.github/workflows/check_repo_ci_jobs.py
index 3a78b8e911..7bf7ed13e1 100644
--- a/.github/workflows/check_repo_ci_jobs.py
+++ b/.github/workflows/check_repo_ci_jobs.py
@@ -1,9 +1,9 @@
+import os
import pathlib
import shutil
+import zipfile
import requests
-import zipfile
-import os
# To test this locally, set these environment variables
REPO_OWNER = os.environ.get("REPO_OWNER", "IfcOpenShell/IfcOpenShell")
diff --git a/aws/lambda/example_handler/__init__.py b/aws/lambda/example_handler/__init__.py
index 5256cb90a2..a6e3fe0212 100644
--- a/aws/lambda/example_handler/__init__.py
+++ b/aws/lambda/example_handler/__init__.py
@@ -1,6 +1,6 @@
+import boto3
import ifcopenshell
import ifcopenshell.util.element
-import boto3
s3 = boto3.client('s3')
diff --git a/choco/bonsai/choco_release.py b/choco/bonsai/choco_release.py
index b63ee3bf89..681e6c58e5 100644
--- a/choco/bonsai/choco_release.py
+++ b/choco/bonsai/choco_release.py
@@ -13,9 +13,10 @@ import hashlib
import os
import pathlib
import re
-from urllib import request
-from github import Github
from typing import NoReturn
+from urllib import request
+
+from github import Github
def get_repo_tag_names() -> list[str]:
diff --git a/choco/bonsai/tools/disable_blenderbim_addon.py b/choco/bonsai/tools/disable_blenderbim_addon.py
index c7355eb7d9..644be2623f 100644
--- a/choco/bonsai/tools/disable_blenderbim_addon.py
+++ b/choco/bonsai/tools/disable_blenderbim_addon.py
@@ -1,6 +1,5 @@
import bpy
-
bpy.ops.preferences.addon_disable(module='blenderbim')
bpy.ops.wm.save_userpref()
diff --git a/choco/bonsai/tools/enable_blenderbim_addon.py b/choco/bonsai/tools/enable_blenderbim_addon.py
index eae588e5f8..2b767dea03 100644
--- a/choco/bonsai/tools/enable_blenderbim_addon.py
+++ b/choco/bonsai/tools/enable_blenderbim_addon.py
@@ -1,6 +1,5 @@
import bpy
-
bpy.ops.preferences.addon_enable(module='blenderbim')
bpy.ops.wm.save_userpref()
diff --git a/conda/update_version_init.py b/conda/update_version_init.py
index e5a7a6fd22..cbcf0df1f9 100644
--- a/conda/update_version_init.py
+++ b/conda/update_version_init.py
@@ -1,7 +1,8 @@
-import re
import argparse
+import re
from pathlib import Path
+
def update_version(file_path: str, version: str) -> None:
"""Update the version string in the given __init__.py file."""
file_path = Path(file_path)
diff --git a/docs/conf.py b/docs/conf.py
index 4583e85a43..5f4b91a23e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,4 +1,5 @@
import textwrap
+
# The `extensions` list should already be in here from `sphinx-quickstart`
extensions = [
# there may be others here already, e.g. 'sphinx.ext.mathjax'
diff --git a/docs/generate_docs.py b/docs/generate_docs.py
index 09f3683c82..8b3e60140d 100644
--- a/docs/generate_docs.py
+++ b/docs/generate_docs.py
@@ -1,10 +1,10 @@
# This program requires doxygen, sphinx, breathe and exhale.
+import multiprocessing
import os
-import sys
import shutil
import subprocess
-import multiprocessing
+import sys
# some extra check to see if we can find sphinx in pypy bin dir
sphinx_build = os.path.join(os.path.dirname(sys.executable), 'sphinx-build')
diff --git a/nix/build-all.py b/nix/build-all.py
index 0b159d1e9f..a76a53862c 100644
--- a/nix/build-all.py
+++ b/nix/build-all.py
@@ -99,35 +99,36 @@ Used environment variables:
"""
-import logging
-import os
-import re
-import sys
import glob
-import subprocess as sp
-import shutil
-import tarfile
+import logging
import multiprocessing
+import os
import platform
-import threading
-import sysconfig
-from datetime import datetime
+import re
+import shutil
# @todo temporary for expired mpfr.org certificate on 2023-04-08
import ssl
+import subprocess as sp
+import sys
+import sysconfig
+import tarfile
+import threading
+from datetime import datetime
ssl._create_default_https_context = ssl._create_unverified_context
import time
-from urllib.request import urlretrieve
from collections.abc import Generator, Sequence
from pathlib import Path
+from urllib.request import urlretrieve
try:
- from typing import Union, Literal
+ from typing import Literal, Union
except:
# python 3.6 compatibility for rocky 8
from typing import Union
+
from typing_extensions import Literal
logger = logging.getLogger(__name__)
diff --git a/pyodide/cache_dependencies.py b/pyodide/cache_dependencies.py
index 0ac2c8a600..5800cba067 100644
--- a/pyodide/cache_dependencies.py
+++ b/pyodide/cache_dependencies.py
@@ -8,12 +8,11 @@ or unpacks existing archives.
Usage: python cache_dependencies.py [pack|unpack]
"""
-import tarfile
import sys
+import tarfile
from pathlib import Path
from typing import Literal
-
CACHE_PREFIX = "cache-"
diff --git a/pyodide/test/test_wheel.py b/pyodide/test/test_wheel.py
index 1204c3d532..f241776d02 100644
--- a/pyodide/test/test_wheel.py
+++ b/pyodide/test/test_wheel.py
@@ -1,6 +1,5 @@
from pathlib import Path
-
WHEEL_FILENAME = next(
p.name for p in (Path.cwd() / "pyodide").iterdir() if p.name.startswith("ifcopenshell-") and p.suffix == ".whl"
)
diff --git a/pyproject.toml b/pyproject.toml
index edd328321e..13abb08d76 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -47,6 +47,7 @@ select = [
"UP", # pyupgrade
"RUF015", # next() > list_comprehension[0]
"RUF022", # sort __all__
+ "I", # import sorting
]
ignore = [
"FA100", # Conflicts with Blender using annotations for props definitions.
diff --git a/src/bcf/bcf/agnostic/extensions.py b/src/bcf/bcf/agnostic/extensions.py
index 20ecd621d8..16e7283c1a 100644
--- a/src/bcf/bcf/agnostic/extensions.py
+++ b/src/bcf/bcf/agnostic/extensions.py
@@ -1,7 +1,8 @@
+from dataclasses import fields
+from typing import NamedTuple, Union
+
import bcf.v2.model.extensions
import bcf.v3.model.extensions
-from typing import NamedTuple, Union
-from dataclasses import fields
class AttributeData(NamedTuple):
diff --git a/src/bcf/bcf/agnostic/model.py b/src/bcf/bcf/agnostic/model.py
index 4afd25d1bc..e511c07656 100644
--- a/src/bcf/bcf/agnostic/model.py
+++ b/src/bcf/bcf/agnostic/model.py
@@ -1,6 +1,7 @@
+from typing import Union
+
import bcf.v2.model
import bcf.v3.model
-from typing import Union
BimSnippet = Union[bcf.v2.model.BimSnippet, bcf.v3.model.BimSnippet]
BitMap = Union[bcf.v2.model.VisualizationInfoBitmap, bcf.v3.model.Bitmap]
diff --git a/src/bcf/bcf/agnostic/topic.py b/src/bcf/bcf/agnostic/topic.py
index 1493d44bd7..1e77f40e97 100644
--- a/src/bcf/bcf/agnostic/topic.py
+++ b/src/bcf/bcf/agnostic/topic.py
@@ -1,13 +1,14 @@
import tempfile
+from pathlib import Path
+from typing import Optional, Union
+
+import bcf.agnostic.model as mdl
import bcf.v2.bcfxml
import bcf.v2.model
import bcf.v2.topic
import bcf.v3.bcfxml
import bcf.v3.model
import bcf.v3.topic
-import bcf.agnostic.model as mdl
-from pathlib import Path
-from typing import Union, Optional
from typing_extensions import assert_never
TopicHandler = Union[bcf.v2.topic.TopicHandler, bcf.v3.topic.TopicHandler]
diff --git a/src/bcf/bcf/agnostic/visinfo.py b/src/bcf/bcf/agnostic/visinfo.py
index 27adf56bdf..a2b248b085 100644
--- a/src/bcf/bcf/agnostic/visinfo.py
+++ b/src/bcf/bcf/agnostic/visinfo.py
@@ -1,5 +1,6 @@
-import bcf.v2.visinfo
-import bcf.v3.visinfo
from typing import Union
+import bcf.v2.visinfo
+import bcf.v3.visinfo
+
VisualizationInfoHandler = Union[bcf.v2.visinfo.VisualizationInfoHandler, bcf.v3.visinfo.VisualizationInfoHandler]
diff --git a/src/bcf/bcf/bcfxml.py b/src/bcf/bcf/bcfxml.py
index 073e50af39..07b1fb5cb0 100644
--- a/src/bcf/bcf/bcfxml.py
+++ b/src/bcf/bcf/bcfxml.py
@@ -29,7 +29,6 @@ from bcf.v3.bcfxml import BcfXml as BcfXml3
from bcf.v3.model import Version as Version3
from bcf.xml_parser import AbstractXmlParserSerializer, XmlParserSerializer
-
BcfXml = Union[BcfXml2, BcfXml3]
diff --git a/src/bcf/bcf/inmemory_zipfile.py b/src/bcf/bcf/inmemory_zipfile.py
index 413da4fcfa..bac4b47c7b 100644
--- a/src/bcf/bcf/inmemory_zipfile.py
+++ b/src/bcf/bcf/inmemory_zipfile.py
@@ -7,6 +7,7 @@ original idea from https://stackoverflow.com/a/19722365/1307905
"""
from __future__ import annotations
+
import zipfile
from io import BytesIO
from os import PathLike
diff --git a/src/bcf/bcf/v2/bcfxml.py b/src/bcf/bcf/v2/bcfxml.py
index 039f1cbe09..ad9f8e7679 100644
--- a/src/bcf/bcf/v2/bcfxml.py
+++ b/src/bcf/bcf/v2/bcfxml.py
@@ -1,6 +1,7 @@
"""BCF XML V2 handler."""
from __future__ import annotations
+
import uuid
import warnings
import zipfile
diff --git a/src/bcf/bcf/v2/topic.py b/src/bcf/bcf/v2/topic.py
index 7ee4c50b60..30506d734d 100644
--- a/src/bcf/bcf/v2/topic.py
+++ b/src/bcf/bcf/v2/topic.py
@@ -1,6 +1,7 @@
"""BCF XML V2 Topic handler."""
from __future__ import annotations
+
import datetime
import tempfile
import uuid
diff --git a/src/bcf/bcf/v2/visinfo.py b/src/bcf/bcf/v2/visinfo.py
index 46d274ea1d..1d081ae782 100644
--- a/src/bcf/bcf/v2/visinfo.py
+++ b/src/bcf/bcf/v2/visinfo.py
@@ -1,12 +1,12 @@
import uuid
import zipfile
-from typing import Any, Optional, Literal, Union
from collections.abc import Iterable
+from typing import Any, Literal, Optional, Union
+import ifcopenshell.util.placement
+import ifcopenshell.util.unit
import numpy as np
from ifcopenshell import entity_instance
-import ifcopenshell.util.unit
-import ifcopenshell.util.placement
from numpy.typing import NDArray
import bcf.v2.model as mdl
diff --git a/src/bcf/bcf/v3/bcfxml.py b/src/bcf/bcf/v3/bcfxml.py
index 872efe5db9..7d5ca0de1f 100644
--- a/src/bcf/bcf/v3/bcfxml.py
+++ b/src/bcf/bcf/v3/bcfxml.py
@@ -1,6 +1,7 @@
"""BCF XML V3 handlers."""
from __future__ import annotations
+
import uuid
import warnings
import zipfile
diff --git a/src/bcf/bcf/v3/topic.py b/src/bcf/bcf/v3/topic.py
index 04753c006e..d82e4ed0f1 100644
--- a/src/bcf/bcf/v3/topic.py
+++ b/src/bcf/bcf/v3/topic.py
@@ -1,6 +1,7 @@
"""BCF XML V3 Topic handler."""
from __future__ import annotations
+
import datetime
import uuid
import zipfile
diff --git a/src/bcf/bcf/v3/visinfo.py b/src/bcf/bcf/v3/visinfo.py
index 7880ddb10f..050641ed23 100644
--- a/src/bcf/bcf/v3/visinfo.py
+++ b/src/bcf/bcf/v3/visinfo.py
@@ -1,12 +1,12 @@
import uuid
import zipfile
-from typing import Any, Optional, Literal, Union
from collections.abc import Iterable
+from typing import Any, Literal, Optional, Union
+import ifcopenshell.util.placement
+import ifcopenshell.util.unit
import numpy as np
from ifcopenshell import entity_instance
-import ifcopenshell.util.unit
-import ifcopenshell.util.placement
from numpy.typing import NDArray
import bcf.v3.model as mdl
diff --git a/src/bcf/tests/conftest.py b/src/bcf/tests/conftest.py
index ea1b2aee8b..f19792122a 100644
--- a/src/bcf/tests/conftest.py
+++ b/src/bcf/tests/conftest.py
@@ -1,5 +1,4 @@
import pytest
-
from bcf.xml_parser import XmlParserSerializer
diff --git a/src/bcf/tests/v2/test_bcf_xml.py b/src/bcf/tests/v2/test_bcf_xml.py
index fed1428e73..1b5128e96f 100644
--- a/src/bcf/tests/v2/test_bcf_xml.py
+++ b/src/bcf/tests/v2/test_bcf_xml.py
@@ -4,9 +4,8 @@ import uuid
from pathlib import Path
from tempfile import TemporaryDirectory
-import pytest
-
import bcf.v2.model as mdl
+import pytest
from bcf.v2.bcfxml import BcfXml
from bcf.v2.topic import TopicHandler
from bcf.v2.visinfo import (
diff --git a/src/bcf/tests/v2/test_example_files.py b/src/bcf/tests/v2/test_example_files.py
index 3821569c28..6d964bd0e9 100644
--- a/src/bcf/tests/v2/test_example_files.py
+++ b/src/bcf/tests/v2/test_example_files.py
@@ -3,11 +3,10 @@ import os
import zipfile
from pathlib import Path
-from xsdata.models.datatype import XmlDateTime
-
import bcf.v2.model as mdl
from bcf.v2.bcfxml import BcfXml
from bcf.v2.topic import TopicHandler
+from xsdata.models.datatype import XmlDateTime
def test_maximum_information() -> None:
diff --git a/src/bcf/tests/v2/test_ifcclash_api.py b/src/bcf/tests/v2/test_ifcclash_api.py
index 14945e8392..34c3a493e4 100644
--- a/src/bcf/tests/v2/test_ifcclash_api.py
+++ b/src/bcf/tests/v2/test_ifcclash_api.py
@@ -1,6 +1,5 @@
import numpy as np
import pytest
-
from bcf.v2.bcfxml import BcfXml
diff --git a/src/bcf/tests/v3/test_bcf_xml.py b/src/bcf/tests/v3/test_bcf_xml.py
index 50664b98c7..ae658ca55f 100644
--- a/src/bcf/tests/v3/test_bcf_xml.py
+++ b/src/bcf/tests/v3/test_bcf_xml.py
@@ -4,9 +4,8 @@ import uuid
from pathlib import Path
from tempfile import TemporaryDirectory
-import pytest
-
import bcf.v3.model as mdl
+import pytest
from bcf.v3.bcfxml import BcfXml
from bcf.v3.topic import TopicHandler
from bcf.v3.visinfo import (
diff --git a/src/bcf/tests/v3/test_example_files.py b/src/bcf/tests/v3/test_example_files.py
index e385b8634f..6774c49982 100644
--- a/src/bcf/tests/v3/test_example_files.py
+++ b/src/bcf/tests/v3/test_example_files.py
@@ -3,11 +3,10 @@ import os
import zipfile
from pathlib import Path
-from xsdata.models.datatype import XmlDateTime
-
import bcf.v3.model as mdl
from bcf.v3.bcfxml import BcfXml
from bcf.v3.topic import TopicHandler
+from xsdata.models.datatype import XmlDateTime
def test_doc_ref_internal() -> None:
diff --git a/src/bcf/tests/v3/test_ifcclash_api.py b/src/bcf/tests/v3/test_ifcclash_api.py
index d470f1ffb8..faea9b6a1a 100644
--- a/src/bcf/tests/v3/test_ifcclash_api.py
+++ b/src/bcf/tests/v3/test_ifcclash_api.py
@@ -1,6 +1,5 @@
import numpy as np
import pytest
-
from bcf.v3.bcfxml import BcfXml
diff --git a/src/bonsai/pyproject.toml b/src/bonsai/pyproject.toml
index 3ec2cb8748..6dab8f3454 100644
--- a/src/bonsai/pyproject.toml
+++ b/src/bonsai/pyproject.toml
@@ -38,3 +38,8 @@ exclude = ["test*"]
[tool.ruff]
extend = "../../pyproject.toml"
+
+[tool.ruff.lint]
+ignore = [
+ "I", # import sorting - ignore it temporarily, still need to do some tests
+]
diff --git a/src/bsdd/bsdd.py b/src/bsdd/bsdd.py
index 9a24d1dd1e..17480c87f5 100644
--- a/src/bsdd/bsdd.py
+++ b/src/bsdd/bsdd.py
@@ -17,15 +17,15 @@
# along with bSDD. If not, see .
from __future__ import annotations
-import uuid
+import http.server
import time
import urllib.parse
-import requests
+import uuid
import webbrowser
-import http.server
-from typing import TypedDict, Literal, Optional, TYPE_CHECKING, Any
-from typing_extensions import NotRequired
+from typing import TYPE_CHECKING, Any, Literal, Optional, TypedDict
+import requests
+from typing_extensions import NotRequired
if TYPE_CHECKING:
import ifcopenshell
diff --git a/src/bsdd/bsdd_json.py b/src/bsdd/bsdd_json.py
index 5edc8616fa..becaac810b 100644
--- a/src/bsdd/bsdd_json.py
+++ b/src/bsdd/bsdd_json.py
@@ -1,11 +1,13 @@
from __future__ import annotations
-from .type_hints import *
-from typing import Optional, Literal
-from datetime import datetime
-from pydantic import BaseModel, Field, PrivateAttr, model_validator, ConfigDict
import json
import weakref
+from datetime import datetime
+from typing import Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field, PrivateAttr, model_validator
+
+from .type_hints import *
def _lower_first(s: str) -> str:
diff --git a/src/bsdd/type_hints.py b/src/bsdd/type_hints.py
index b408e3b9a1..6f825cdd80 100644
--- a/src/bsdd/type_hints.py
+++ b/src/bsdd/type_hints.py
@@ -1,6 +1,5 @@
from typing import Literal
-
COUNTRY_CODE = Literal[
"AF",
"AX",
diff --git a/src/bsdd/yml_to_classes.py b/src/bsdd/yml_to_classes.py
index ba53917051..981d3c4439 100644
--- a/src/bsdd/yml_to_classes.py
+++ b/src/bsdd/yml_to_classes.py
@@ -1,8 +1,8 @@
-import yaml
import sys
from pathlib import Path
from typing import Any
+import yaml
type_to_python_type = {
"string": "str",
diff --git a/src/ifc2ca/_deprecated/ca2ifc.py b/src/ifc2ca/_deprecated/ca2ifc.py
index 5f9115396e..0f55d9d6d3 100644
--- a/src/ifc2ca/_deprecated/ca2ifc.py
+++ b/src/ifc2ca/_deprecated/ca2ifc.py
@@ -17,11 +17,12 @@
# along with Ifc2CA. If not, see .
import json
-import ifcopenshell
-import ifcopenshell.guid
import os
from datetime import datetime
+import ifcopenshell
+import ifcopenshell.guid
+
class CA2IFC:
def __init__(self, inputFilename, outputFilename):
diff --git a/src/ifc2ca/_deprecated/scriptCodeAsterBonded.py b/src/ifc2ca/_deprecated/scriptCodeAsterBonded.py
index 005e28fa4c..0b1184453b 100644
--- a/src/ifc2ca/_deprecated/scriptCodeAsterBonded.py
+++ b/src/ifc2ca/_deprecated/scriptCodeAsterBonded.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Ifc2CA. If not, see .
-import json
-import numpy as np
import itertools
+import json
from pathlib import Path
+import numpy as np
+
flatten = itertools.chain.from_iterable
ScaleFactor = 1.0
diff --git a/src/ifc2ca/_deprecated/scriptSalomeBonded.py b/src/ifc2ca/_deprecated/scriptSalomeBonded.py
index a1c6030956..fb2bd575f9 100644
--- a/src/ifc2ca/_deprecated/scriptSalomeBonded.py
+++ b/src/ifc2ca/_deprecated/scriptSalomeBonded.py
@@ -16,15 +16,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Ifc2CA. If not, see .
+import itertools
+import json
import os
import time
-import json
+from pathlib import Path
+
+import numpy as np
import salome
import salome_notebook
import salome_version
-import numpy as np
-import itertools
-from pathlib import Path
flatten = itertools.chain.from_iterable
@@ -155,10 +156,11 @@ class MODEL:
###
### GEOM component
###
- import GEOM
- from salome.geom import geomBuilder
import math
+
+ import GEOM
import SALOMEDS
+ from salome.geom import geomBuilder
gg = salome.ImportComponentGUI("GEOM")
if NEW_SALOME:
diff --git a/src/ifc2ca/ifc2ca.py b/src/ifc2ca/ifc2ca.py
index f8908b0aa7..728df67d45 100644
--- a/src/ifc2ca/ifc2ca.py
+++ b/src/ifc2ca/ifc2ca.py
@@ -17,6 +17,7 @@
# along with Ifc2CA. If not, see .
from __future__ import annotations
+
import json
import os
import subprocess
diff --git a/src/ifc4d/__main__.py b/src/ifc4d/__main__.py
index d7e2a58307..8313ba7464 100644
--- a/src/ifc4d/__main__.py
+++ b/src/ifc4d/__main__.py
@@ -1,13 +1,12 @@
+import argparse
import os
import sys
-import argparse
+import ifcopenshell
+from ifc4d.msp2ifc import MSP2Ifc
from ifc4d.p6xer2ifc import P6XER2Ifc
from ifc4d.p62ifc import P62Ifc
-from ifc4d.msp2ifc import MSP2Ifc
from ifc4d.pp2ifc import PP2Ifc
-import ifcopenshell
-
parser = argparse.ArgumentParser()
parser.add_argument("-f", "--file", action="store", type=str, required=True, help="schedule file name to be parsed")
diff --git a/src/ifc4d/ifc4d/common.py b/src/ifc4d/ifc4d/common.py
index d13840267a..f4fd42e1d1 100644
--- a/src/ifc4d/ifc4d/common.py
+++ b/src/ifc4d/ifc4d/common.py
@@ -1,12 +1,14 @@
from __future__ import annotations
+
+from datetime import date, datetime, timedelta
+from typing import Any, TypedDict, Union
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.control
import ifcopenshell.api.resource
import ifcopenshell.api.sequence
import ifcopenshell.util.date
-from datetime import datetime, timedelta, date
-from typing import Union, Any, TypedDict
from typing_extensions import NotRequired
diff --git a/src/ifc4d/ifc4d/csv2ifc.py b/src/ifc4d/ifc4d/csv2ifc.py
index 1233734290..6efbf4fad6 100644
--- a/src/ifc4d/ifc4d/csv2ifc.py
+++ b/src/ifc4d/ifc4d/csv2ifc.py
@@ -17,23 +17,24 @@
# along with IfcResources. If not, see .
from __future__ import annotations
-import csv
+
import _csv
-import ifcopenshell.api.resource
-import isodate
+import csv
+import datetime
+from typing import Any, Literal, NamedTuple, Optional, Union, cast, get_args
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.cost
import ifcopenshell.api.pset
+import ifcopenshell.api.resource
import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.util.date
import ifcopenshell.util.element
import ifcopenshell.util.resource
import ifcopenshell.util.unit
-import datetime
-from typing import Any, Optional, Union, Literal, get_args, NamedTuple, cast
-
+import isodate
SUPPORTED_COLUMN = Literal[
"HIERARCHY",
diff --git a/src/ifc4d/ifc4d/csv4d2ifc.py b/src/ifc4d/ifc4d/csv4d2ifc.py
index 9a33ea8198..2e519cc0ea 100644
--- a/src/ifc4d/ifc4d/csv4d2ifc.py
+++ b/src/ifc4d/ifc4d/csv4d2ifc.py
@@ -18,13 +18,14 @@
import csv
+import locale
+import re
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.root
import ifcopenshell.api.sequence
import ifcopenshell.util.date
-import locale
-import re
class Csv2Ifc:
diff --git a/src/ifc4d/ifc4d/ifc2msp.py b/src/ifc4d/ifc4d/ifc2msp.py
index e7d540dd3a..a685f689dc 100644
--- a/src/ifc4d/ifc4d/ifc2msp.py
+++ b/src/ifc4d/ifc4d/ifc2msp.py
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Ifc4D. If not, see .
-import uuid
import datetime
+import uuid
+import xml.etree.ElementTree as ET
+
import ifcopenshell
import ifcopenshell.util.date
import ifcopenshell.util.sequence
-import xml.etree.ElementTree as ET
class Ifc2Msp:
diff --git a/src/ifc4d/ifc4d/ifc2p6.py b/src/ifc4d/ifc4d/ifc2p6.py
index 1d4bfea195..5093f306be 100644
--- a/src/ifc4d/ifc4d/ifc2p6.py
+++ b/src/ifc4d/ifc4d/ifc2p6.py
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Ifc4D. If not, see .
-import uuid
import datetime
+import uuid
+import xml.etree.ElementTree as ET
+
import ifcopenshell
import ifcopenshell.util.date
import ifcopenshell.util.sequence
-import xml.etree.ElementTree as ET
+
from .common import ScheduleIfcGenerator
diff --git a/src/ifc4d/ifc4d/msp2ifc.py b/src/ifc4d/ifc4d/msp2ifc.py
index 2285a1a1ea..3ba14a6985 100644
--- a/src/ifc4d/ifc4d/msp2ifc.py
+++ b/src/ifc4d/ifc4d/msp2ifc.py
@@ -17,7 +17,9 @@
# along with Ifc4D. If not, see .
import datetime
-from datetime import timedelta, date
+import xml.etree.ElementTree as ET
+from datetime import date, timedelta
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.control
@@ -25,7 +27,6 @@ import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.api.sequence
import ifcopenshell.util.date
-import xml.etree.ElementTree as ET
class MSP2Ifc:
diff --git a/src/ifc4d/ifc4d/p62ifc.py b/src/ifc4d/ifc4d/p62ifc.py
index aeb4338c07..833bf39dd3 100644
--- a/src/ifc4d/ifc4d/p62ifc.py
+++ b/src/ifc4d/ifc4d/p62ifc.py
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Ifc4D. If not, see .
-import math
import datetime
+import math
+import xml.etree.ElementTree as ET
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.date
-import xml.etree.ElementTree as ET
+
from .common import ScheduleIfcGenerator
diff --git a/src/ifc4d/ifc4d/p6xer2ifc.py b/src/ifc4d/ifc4d/p6xer2ifc.py
index 9e8bd1bfd9..ef218ade2d 100644
--- a/src/ifc4d/ifc4d/p6xer2ifc.py
+++ b/src/ifc4d/ifc4d/p6xer2ifc.py
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Ifc4D. If not, see .
-from xerparser.reader import Reader
+from datetime import date, datetime, timedelta
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.date
-from datetime import datetime, timedelta, date
+from xerparser.reader import Reader
+
from .common import ScheduleIfcGenerator
diff --git a/src/ifc4d/ifc4d/pp2ifc.py b/src/ifc4d/ifc4d/pp2ifc.py
index 5ce9b68b48..338a887e91 100644
--- a/src/ifc4d/ifc4d/pp2ifc.py
+++ b/src/ifc4d/ifc4d/pp2ifc.py
@@ -5,16 +5,17 @@ import sys
print("In module products sys.path[0], __package__ ==", sys.path[0], __package__)
sys.path.append(sys.path[0])
-import sqlite3
import datetime
-from datetime import timedelta
-import ifcopenshell.util.date
-from .wpattern import AstaCalendarWorkPattern
-from .common import ScheduleIfcGenerator, Calendar, WBSEntry, Activity
+import sqlite3
import time
from collections import defaultdict
+from datetime import timedelta
from typing import Any
+import ifcopenshell.util.date
+
+from .common import Activity, Calendar, ScheduleIfcGenerator, WBSEntry
+from .wpattern import AstaCalendarWorkPattern
list_of_tables = [
"BAR",
diff --git a/src/ifc4d/ifc4d/wpattern.py b/src/ifc4d/ifc4d/wpattern.py
index 2e434223d5..0c2cc265b9 100644
--- a/src/ifc4d/ifc4d/wpattern.py
+++ b/src/ifc4d/ifc4d/wpattern.py
@@ -7,8 +7,9 @@ for each day as a key there is a list of working times with the format
"""
import re
-from datetime import time, datetime
+from datetime import datetime, time
from typing import Any
+
from ifc4d.common import WorkSlot
diff --git a/src/ifc5d/ifc5d/csv2ifc.py b/src/ifc5d/ifc5d/csv2ifc.py
index 6e0cb7b5ea..b1edd82d88 100644
--- a/src/ifc5d/ifc5d/csv2ifc.py
+++ b/src/ifc5d/ifc5d/csv2ifc.py
@@ -17,19 +17,21 @@
# along with Ifc5D. If not, see .
from __future__ import annotations
+
import csv
+import locale
+from pathlib import Path
+from typing import Optional, TypedDict, Union
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.control
import ifcopenshell.api.cost
import ifcopenshell.api.root
-import ifcopenshell.util.unit
-import ifcopenshell.util.selector
-import ifcopenshell.util.element
import ifcopenshell.util.cost
-import locale
-from pathlib import Path
-from typing import Union, Optional, TypedDict
+import ifcopenshell.util.element
+import ifcopenshell.util.selector
+import ifcopenshell.util.unit
from typing_extensions import NotRequired
diff --git a/src/ifc5d/ifc5d/ifc2json.py b/src/ifc5d/ifc5d/ifc2json.py
index fae04126af..3b184ca1c7 100644
--- a/src/ifc5d/ifc5d/ifc2json.py
+++ b/src/ifc5d/ifc5d/ifc2json.py
@@ -1,11 +1,11 @@
-import ifcopenshell
-import ifcopenshell.util.unit
from typing import Any
+
+import ifcopenshell
import ifcopenshell.util.cost
import ifcopenshell.util.date
+import ifcopenshell.util.unit
from ifcopenshell.util.classification import get_references
-
CostItem = dict[str, Any]
diff --git a/src/ifc5d/ifc5d/ifc5Dspreadsheet.py b/src/ifc5d/ifc5d/ifc5Dspreadsheet.py
index 369232c401..324340fb1c 100644
--- a/src/ifc5d/ifc5d/ifc5Dspreadsheet.py
+++ b/src/ifc5d/ifc5d/ifc5Dspreadsheet.py
@@ -18,18 +18,20 @@
from __future__ import annotations
-import os
-import time
+
import argparse
import datetime
import logging
+import os
+import time
+from collections import Counter
+from typing import Any, Optional, TypedDict, Union
+
import ifcopenshell
-import ifcopenshell.util.element
import ifcopenshell.util.cost
import ifcopenshell.util.date
+import ifcopenshell.util.element
import ifcopenshell.util.unit
-from collections import Counter
-from typing import Union, Optional, Any, TypedDict
class CostItem(TypedDict):
@@ -418,9 +420,9 @@ class Ifc5DCsvWriter(Ifc5Dwriter):
class Ifc5DOdsWriter(Ifc5Dwriter):
def write(self) -> None:
+ from odf.number import CurrencyStyle, CurrencySymbol, Number, NumberStyle, Text
from odf.opendocument import OpenDocumentSpreadsheet
from odf.style import Style, TableCellProperties
- from odf.number import NumberStyle, CurrencyStyle, CurrencySymbol, Number, Text
super().write()
@@ -448,9 +450,9 @@ class Ifc5DOdsWriter(Ifc5Dwriter):
self.doc.save(os.path.join(self.output, file_name), True)
def write_table(self, cost_schedule):
- from odf.table import Table, TableRow, TableCell
+ from odf.number import CurrencyStyle, CurrencySymbol, Number, NumberStyle, Text
+ from odf.table import Table, TableCell, TableRow
from odf.text import P
- from odf.number import NumberStyle, CurrencyStyle, CurrencySymbol, Number, Text
def row():
return TableRow()
@@ -594,11 +596,13 @@ class Ifc5DPdfWriter(Ifc5Dwriter):
def write(self) -> None:
import os
- import ifc5d
import shutil
- import typst
import tempfile
+ import typst
+
+ import ifc5d
+
DEFAULT_OPTIONS = {
"nested_structure_depth": 0,
"parent_to_new_page_up_to_depth": 0,
diff --git a/src/ifc5d/ifc5d/qto.py b/src/ifc5d/ifc5d/qto.py
index 67e5478ef1..f7fba8d9e5 100644
--- a/src/ifc5d/ifc5d/qto.py
+++ b/src/ifc5d/ifc5d/qto.py
@@ -18,24 +18,25 @@
import functools
import itertools
+import json
+import multiprocessing
import os
import types
-import json
+from collections import defaultdict
+from collections.abc import Iterable
+from typing import Any, Literal, NamedTuple, Union, get_args
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.pset
import ifcopenshell.geom
import ifcopenshell.ifcopenshell_wrapper as W
-import ifcopenshell.util.unit
import ifcopenshell.util.element
+import ifcopenshell.util.representation
import ifcopenshell.util.selector
import ifcopenshell.util.shape
-import ifcopenshell.util.representation
import ifcopenshell.util.type
-import multiprocessing
-from collections import defaultdict
-from typing import Any, Literal, get_args, Union, NamedTuple
-from collections.abc import Iterable
+import ifcopenshell.util.unit
class Function(NamedTuple):
@@ -545,8 +546,8 @@ class Blender(QtoCalculator):
@classmethod
def calculate(cls, ifc_file, elements, qtos, results):
- import bonsai.tool as tool
import bonsai.bim.module.qto.calculator as calculator
+ import bonsai.tool as tool
unit_converter = SI2ProjectUnitConverter(ifc_file)
formula_functions: dict[str, types.FunctionType] = {}
diff --git a/src/ifc5d/test/test_csv2ifc.py b/src/ifc5d/test/test_csv2ifc.py
index 49858ba386..7dc1bbd718 100644
--- a/src/ifc5d/test/test_csv2ifc.py
+++ b/src/ifc5d/test/test_csv2ifc.py
@@ -16,17 +16,18 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import tempfile
import csv
-import pytest
+import tempfile
+from pathlib import Path
+
+import ifc5d.csv2ifc
+import ifc5d.ifc5Dspreadsheet
import ifcopenshell
import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.util.cost
import ifcopenshell.util.element
-import ifc5d.csv2ifc
-import ifc5d.ifc5Dspreadsheet
-from pathlib import Path
+import pytest
class TestCsv2Ifc:
diff --git a/src/ifcbimtester/bimtester/__init__.py b/src/ifcbimtester/bimtester/__init__.py
index d76bea9460..180dbfaa6f 100644
--- a/src/ifcbimtester/bimtester/__init__.py
+++ b/src/ifcbimtester/bimtester/__init__.py
@@ -16,8 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with BIMTester. If not, see .
-from os.path import dirname
-from os.path import realpath
+from os.path import dirname, realpath
__version__ = version = "0.0.0"
diff --git a/src/ifcbimtester/bimtester/clean.py b/src/ifcbimtester/bimtester/clean.py
index f457da2a59..d681a9fe29 100644
--- a/src/ifcbimtester/bimtester/clean.py
+++ b/src/ifcbimtester/bimtester/clean.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with BIMTester. If not, see .
-import ifcopenshell
import os
from pathlib import Path
+import ifcopenshell
+
class TestPurger:
def __init__(self):
diff --git a/src/ifcbimtester/bimtester/features/environment.py b/src/ifcbimtester/bimtester/features/environment.py
index dc249f32d5..d9576dc885 100644
--- a/src/ifcbimtester/bimtester/features/environment.py
+++ b/src/ifcbimtester/bimtester/features/environment.py
@@ -17,15 +17,12 @@
# along with BIMTester. If not, see .
import os
-from behave.model import Scenario
+from behave.model import Scenario
from bimtester.ifc import IfcStore
from bimtester.lang import switch_locale
-from logfile import append_logfile
-from logfile import create_logfile
-from zoom_smart_view import add_smartview
-from zoom_smart_view import create_zoom_set_of_smartviews
-
+from logfile import append_logfile, create_logfile
+from zoom_smart_view import add_smartview, create_zoom_set_of_smartviews
this_path = os.path.dirname(os.path.realpath(__file__))
diff --git a/src/ifcbimtester/bimtester/features/steps/aggregation/en.py b/src/ifcbimtester/bimtester/features/steps/aggregation/en.py
index 70568d42cb..a2bbe621a1 100644
--- a/src/ifcbimtester/bimtester/features/steps/aggregation/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/aggregation/en.py
@@ -16,8 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with BIMTester. If not, see .
-from behave import step, given, when, then, use_step_matcher
-
+from behave import given, step, then, use_step_matcher, when
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.table import TableModel
diff --git a/src/ifcbimtester/bimtester/features/steps/all.py b/src/ifcbimtester/bimtester/features/steps/all.py
index a525eccf00..6c46e6450d 100644
--- a/src/ifcbimtester/bimtester/features/steps/all.py
+++ b/src/ifcbimtester/bimtester/features/steps/all.py
@@ -26,7 +26,7 @@ use_step_matcher("parse")
from bimtester.features.steps.attributes_eleclasses import de, en
use_step_matcher("parse")
-from bimtester.features.steps.attributes_psets import en, de
+from bimtester.features.steps.attributes_psets import de, en
use_step_matcher("parse")
from bimtester.features.steps.attributes_qsets import en
diff --git a/src/ifcbimtester/bimtester/features/steps/application/en.py b/src/ifcbimtester/bimtester/features/steps/application/en.py
index b2dbd5ffe7..9e40eb99b4 100644
--- a/src/ifcbimtester/bimtester/features/steps/application/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/application/en.py
@@ -17,7 +17,6 @@
# along with BIMTester. If not, see .
from behave import step
-
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses/en.py b/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses/en.py
index f141eaee23..e032207acf 100644
--- a/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses/en.py
@@ -17,9 +17,7 @@
# along with BIMTester. If not, see .
import ifcopenshell.util.element as eleutils
-
from behave import step
-
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/features/steps/attributes_psets/en.py b/src/ifcbimtester/bimtester/features/steps/attributes_psets/en.py
index 6141213801..d9b41eb10a 100644
--- a/src/ifcbimtester/bimtester/features/steps/attributes_psets/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/attributes_psets/en.py
@@ -16,9 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with BIMTester. If not, see .
-from behave import step
-from behave import use_step_matcher
-
+from behave import step, use_step_matcher
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.lang import _
@@ -48,6 +46,7 @@ def step_impl(context, ifc_class, property_path):
)
def step_impl(context, ifc_class, property_path, pattern):
import re
+
from ifcopenshell.util.element import get_psets
pset_name, property_name = property_path.split(".")
diff --git a/src/ifcbimtester/bimtester/features/steps/classification/en.py b/src/ifcbimtester/bimtester/features/steps/classification/en.py
index 356d9cfd36..461b6b91e2 100644
--- a/src/ifcbimtester/bimtester/features/steps/classification/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/classification/en.py
@@ -17,8 +17,8 @@
# along with BIMTester. If not, see .
import json
-from behave import step
+from behave import step
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/features/steps/element_classes/en.py b/src/ifcbimtester/bimtester/features/steps/element_classes/en.py
index e41c0aad05..035ff05cf2 100644
--- a/src/ifcbimtester/bimtester/features/steps/element_classes/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/element_classes/en.py
@@ -17,7 +17,6 @@
# along with BIMTester. If not, see .
from behave import step
-
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/features/steps/geocoding/en.py b/src/ifcbimtester/bimtester/features/steps/geocoding/en.py
index c9b4007d49..de0204ba55 100644
--- a/src/ifcbimtester/bimtester/features/steps/geocoding/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/geocoding/en.py
@@ -17,7 +17,6 @@
# along with BIMTester. If not, see .
from behave import step, use_step_matcher
-
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/features/steps/geolocation/en.py b/src/ifcbimtester/bimtester/features/steps/geolocation/en.py
index 13aa359671..40568b6fe4 100644
--- a/src/ifcbimtester/bimtester/features/steps/geolocation/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/geolocation/en.py
@@ -17,14 +17,13 @@
# along with BIMTester. If not, see .
import math
-import numpy as np
+
import ifcopenshell
import ifcopenshell.util.element
-import ifcopenshell.util.placement
import ifcopenshell.util.geolocation
-
+import ifcopenshell.util.placement
+import numpy as np
from behave import step
-
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/features/steps/geometric_detail/en.py b/src/ifcbimtester/bimtester/features/steps/geometric_detail/en.py
index 153cca30b5..5179a1d726 100644
--- a/src/ifcbimtester/bimtester/features/steps/geometric_detail/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/geometric_detail/en.py
@@ -17,7 +17,6 @@
# along with BIMTester. If not, see .
from behave import step
-
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/features/steps/model_federation/en.py b/src/ifcbimtester/bimtester/features/steps/model_federation/en.py
index af0edc0975..db76d08484 100644
--- a/src/ifcbimtester/bimtester/features/steps/model_federation/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/model_federation/en.py
@@ -18,9 +18,7 @@
import ifcopenshell.util.geolocation
import ifcopenshell.util.placement
-
from behave import step
-
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/features/steps/project_setup/en.py b/src/ifcbimtester/bimtester/features/steps/project_setup/en.py
index 84e3e84f58..c86990eb7d 100644
--- a/src/ifcbimtester/bimtester/features/steps/project_setup/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/project_setup/en.py
@@ -17,7 +17,6 @@
# along with BIMTester. If not, see .
from behave import step
-
from bimtester import util
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/features/steps/spatial_structure/en.py b/src/ifcbimtester/bimtester/features/steps/spatial_structure/en.py
index 5eee990077..f57efa1713 100644
--- a/src/ifcbimtester/bimtester/features/steps/spatial_structure/en.py
+++ b/src/ifcbimtester/bimtester/features/steps/spatial_structure/en.py
@@ -17,7 +17,6 @@
# along with BIMTester. If not, see .
from behave import step
-
from bimtester.ifc import IfcStore
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/guiwidget.py b/src/ifcbimtester/bimtester/guiwidget.py
index b9b02e81af..9c41a78b7e 100644
--- a/src/ifcbimtester/bimtester/guiwidget.py
+++ b/src/ifcbimtester/bimtester/guiwidget.py
@@ -16,18 +16,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with BIMTester. If not, see .
-import os
import json
+import os
import sys
import webbrowser
+from PySide2 import QtCore, QtGui, QtWidgets
+
import bimtester.reports
import bimtester.run
-from PySide2 import QtCore
-from PySide2 import QtGui
-from PySide2 import QtWidgets
-
def run():
app = QtWidgets.QApplication(sys.argv)
diff --git a/src/ifcbimtester/bimtester/reports.py b/src/ifcbimtester/bimtester/reports.py
index df237f631b..2c250c7f85 100644
--- a/src/ifcbimtester/bimtester/reports.py
+++ b/src/ifcbimtester/bimtester/reports.py
@@ -19,8 +19,10 @@
import datetime
import json
import os
-import pystache
import sys
+
+import pystache
+
from bimtester.lang import _
diff --git a/src/ifcbimtester/bimtester/run.py b/src/ifcbimtester/bimtester/run.py
index 5f0d58bd18..f4684cfb78 100644
--- a/src/ifcbimtester/bimtester/run.py
+++ b/src/ifcbimtester/bimtester/run.py
@@ -16,27 +16,29 @@
# You should have received a copy of the GNU Lesser General Public License
# along with BIMTester. If not, see .
-import os
-import sys
import json
-import shutil
import logging
+import os
+import shutil
+import sys
import tempfile
+
import ifcopenshell
try:
import ifcopenshell.express
except:
pass # They are using an old version of IfcOpenShell. Gracefully degrade for now.
-import behave.formatter.pretty # Needed for pyinstaller to package it
-from bimtester.ifc import IfcStore
from distutils.dir_util import copy_tree
-from behave.__main__ import main as behave_main
-
# TODO: refactor when this isn't super experimental
from logging import StreamHandler
+import behave.formatter.pretty # Needed for pyinstaller to package it
+from behave.__main__ import main as behave_main
+
+from bimtester.ifc import IfcStore
+
class TestRunner:
def __init__(self, ifc_path, schema_path=None, ifc=None):
diff --git a/src/ifcbimtester/bimtester/util.py b/src/ifcbimtester/bimtester/util.py
index a9e09b0b8e..16bdf06aa6 100644
--- a/src/ifcbimtester/bimtester/util.py
+++ b/src/ifcbimtester/bimtester/util.py
@@ -16,10 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with BIMTester. If not, see .
+import json
+
import ifcopenshell
import ifcopenshell.util.element
import ifcopenshell.validate
-import json
+
from bimtester.lang import _
diff --git a/src/ifcbimtester/cli.py b/src/ifcbimtester/cli.py
index f091fc27ae..7172b62023 100644
--- a/src/ifcbimtester/cli.py
+++ b/src/ifcbimtester/cli.py
@@ -19,8 +19,9 @@
# along with BIMTester. If not, see .
-import os
import argparse
+import os
+
import bimtester.clean
import bimtester.reports
import bimtester.run
diff --git a/src/ifcbimtester/examples/steps/aggregation.py b/src/ifcbimtester/examples/steps/aggregation.py
index 67435eee62..ccf46b5e0d 100644
--- a/src/ifcbimtester/examples/steps/aggregation.py
+++ b/src/ifcbimtester/examples/steps/aggregation.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with BIMTester. If not, see .
-from behave import step, given, when, then, use_step_matcher
+from behave import given, step, then, use_step_matcher, when
use_step_matcher("parse")
diff --git a/src/ifcbimtester/examples/steps/attributes_eleclasses.py b/src/ifcbimtester/examples/steps/attributes_eleclasses.py
index 466eff15c2..ed5475ac65 100644
--- a/src/ifcbimtester/examples/steps/attributes_eleclasses.py
+++ b/src/ifcbimtester/examples/steps/attributes_eleclasses.py
@@ -17,10 +17,8 @@
# along with BIMTester. If not, see .
from behave import step
-
from utils import IfcFile
-
use_step_matcher("re")
diff --git a/src/ifcbimtester/gui.py b/src/ifcbimtester/gui.py
index 1fe0c6b674..6c5ada241b 100644
--- a/src/ifcbimtester/gui.py
+++ b/src/ifcbimtester/gui.py
@@ -21,5 +21,4 @@
from bimtester.guiwidget import run
-
run()
diff --git a/src/ifcblender/io_import_scene_ifc/__init__.py b/src/ifcblender/io_import_scene_ifc/__init__.py
index 29834b2356..c85864a6de 100644
--- a/src/ifcblender/io_import_scene_ifc/__init__.py
+++ b/src/ifcblender/io_import_scene_ifc/__init__.py
@@ -40,17 +40,18 @@ if "bpy" in locals():
if "ifcopenshell" in locals():
importlib.reload(ifcopenshell)
+import logging
+import os
+from collections import defaultdict
+
+import bpy
+import mathutils
from bpy.props import (
BoolProperty,
IntProperty,
StringProperty,
)
from bpy_extras.io_utils import ImportHelper
-from collections import defaultdict
-import bpy
-import logging
-import mathutils
-import os
major, minor = bpy.app.version[0:2]
transpose_matrices = minor >= 62
diff --git a/src/ifccityjson/ifccityjson/__main__.py b/src/ifccityjson/ifccityjson/__main__.py
index 284560b288..6a9e5e9881 100644
--- a/src/ifccityjson/ifccityjson/__main__.py
+++ b/src/ifccityjson/ifccityjson/__main__.py
@@ -17,7 +17,9 @@
# along with ifccityjson. If not, see .
import argparse
+
from cjio import cityjson
+
from .cityjson2ifc import Cityjson2ifc
diff --git a/src/ifccityjson/ifccityjson/cityjson2ifc/cityjson2ifc.py b/src/ifccityjson/ifccityjson/cityjson2ifc/cityjson2ifc.py
index 441855baf4..f26f5c89d6 100644
--- a/src/ifccityjson/ifccityjson/cityjson2ifc/cityjson2ifc.py
+++ b/src/ifccityjson/ifccityjson/cityjson2ifc/cityjson2ifc.py
@@ -18,6 +18,8 @@
# along with ifccityjson. If not, see .
import os
+from datetime import datetime
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.context
@@ -26,10 +28,9 @@ import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.guid
-from datetime import datetime
-from .geometry import GeometryIO
from . import __version__
+from .geometry import GeometryIO
JSON_TO_IFC = {
"Building": ["IfcBuilding"],
diff --git a/src/ifcclash/ifcclash/__main__.py b/src/ifcclash/ifcclash/__main__.py
index bc81131a53..13371a1119 100644
--- a/src/ifcclash/ifcclash/__main__.py
+++ b/src/ifcclash/ifcclash/__main__.py
@@ -18,10 +18,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcClash. If not, see .
-import sys
+import argparse
import json
import logging
-import argparse
+import sys
+
from .ifcclash import Clasher, ClashSettings
parser = argparse.ArgumentParser(description="Clashes geometry between two IFC files")
diff --git a/src/ifcclash/ifcclash/ifcclash.py b/src/ifcclash/ifcclash/ifcclash.py
index 409fb914d7..6e8f05b3a8 100644
--- a/src/ifcclash/ifcclash/ifcclash.py
+++ b/src/ifcclash/ifcclash/ifcclash.py
@@ -20,15 +20,17 @@
from __future__ import annotations
+
import json
-import time
-import numpy as np
import multiprocessing
+import time
+from logging import Logger
+from typing import Literal, TypedDict, Union
+
import ifcopenshell
import ifcopenshell.geom
import ifcopenshell.util.selector
-from logging import Logger
-from typing import Literal, TypedDict, Union
+import numpy as np
from typing_extensions import NotRequired, assert_never
@@ -256,9 +258,10 @@ class Clasher:
json.dump(clash_sets, clashes_file, indent=4)
def smart_group_clashes(self, clash_sets: list[ClashSet], max_clustering_distance: float):
- from sklearn.cluster import OPTICS
from collections import defaultdict
+ from sklearn.cluster import OPTICS
+
count_of_input_clashes = 0
count_of_clash_sets = 0
count_of_smart_groups = 0
diff --git a/src/ifcclash/make.py b/src/ifcclash/make.py
index b4436f6e14..e15c972795 100644
--- a/src/ifcclash/make.py
+++ b/src/ifcclash/make.py
@@ -21,6 +21,5 @@
import os
import subprocess
-
cmd = "pyinstaller ./bootstrap.py --name ifcclash --onefile --clean"
subprocess.check_output(cmd, shell=True)
diff --git a/src/ifccsv/ifccsv.py b/src/ifccsv/ifccsv.py
index 6c87209770..341fa186e7 100755
--- a/src/ifccsv/ifccsv.py
+++ b/src/ifccsv/ifccsv.py
@@ -20,23 +20,24 @@
# This can be packaged with `pyinstaller --onefile --clean --icon=icon.ico ifccsv.py`
+import argparse
+import csv
import os
import re
-import csv
-import argparse
+from collections.abc import Iterable
+from statistics import mean
+from typing import Literal, Optional, Union
+
import ifcopenshell
-import ifcopenshell.util.selector
import ifcopenshell.util.element
import ifcopenshell.util.schema
-from statistics import mean
-from typing import Optional, Union, Literal
-from collections.abc import Iterable
+import ifcopenshell.util.selector
try:
from odf.namespaces import OFFICENS
from odf.opendocument import OpenDocumentSpreadsheet, load
from odf.style import Style, TableCellProperties
- from odf.table import Table, TableRow, TableCell
+ from odf.table import Table, TableCell, TableRow
from odf.text import P
except:
pass # No ODF support
diff --git a/src/ifcdiff/ifcdiff.py b/src/ifcdiff/ifcdiff.py
index 889f23ca37..c7d6bb5d03 100755
--- a/src/ifcdiff/ifcdiff.py
+++ b/src/ifcdiff/ifcdiff.py
@@ -20,23 +20,23 @@
# This can be packaged with `pyinstaller --onefile --clean --icon=icon.ico ifcdiff.py`
-import time
+import argparse
import json
import logging
-import argparse
-import numpy as np
import multiprocessing
+import time
+from typing import Any, Literal, Optional, Union
+
import ifcopenshell
import ifcopenshell.geom
-import ifcopenshell.util.element
-import ifcopenshell.util.selector
-import ifcopenshell.util.placement
import ifcopenshell.util.classification
+import ifcopenshell.util.element
+import ifcopenshell.util.placement
import ifcopenshell.util.representation
+import ifcopenshell.util.selector
+import numpy as np
from deepdiff import DeepDiff
from orderly_set import OrderedSet
-from typing import Optional, Union, Literal, Any
-
__version__ = version = "0.0.0"
diff --git a/src/ifcdiff/test.py b/src/ifcdiff/test.py
index c9e632091f..ca294a1ed4 100644
--- a/src/ifcdiff/test.py
+++ b/src/ifcdiff/test.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 ifcdiff
import ifcopenshell
import ifcopenshell.api.context
import ifcopenshell.api.geometry
@@ -24,6 +23,8 @@ import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.util.representation
+import ifcdiff
+
def setup_project() -> ifcopenshell.file:
ifc_file = ifcopenshell.file(schema="IFC4")
diff --git a/src/ifcfm/ifcfm/__init__.py b/src/ifcfm/ifcfm/__init__.py
index 14fa76146d..ced960305c 100644
--- a/src/ifcfm/ifcfm/__init__.py
+++ b/src/ifcfm/ifcfm/__init__.py
@@ -17,15 +17,17 @@
# along with IfcFM. If not, see .
from __future__ import annotations
-import os
-import re
+
import csv
import importlib
-import ifcopenshell.util.selector
-from pathlib import Path
+import os
+import re
from collections import defaultdict
-from typing import Literal, Union, Any, TYPE_CHECKING
from collections.abc import Callable
+from pathlib import Path
+from typing import TYPE_CHECKING, Any, Literal, Union
+
+import ifcopenshell.util.selector
try:
from openpyxl import Workbook
@@ -37,7 +39,7 @@ try:
import odf.namespaces as odf_ns
from odf.opendocument import OpenDocumentSpreadsheet
from odf.style import Style, TableCellProperties, TableProperties
- from odf.table import Table, TableRow, TableCell
+ from odf.table import Table, TableCell, TableRow
from odf.text import P
except:
pass # No ODF support
diff --git a/src/ifcfm/ifcfm/__main__.py b/src/ifcfm/ifcfm/__main__.py
index 9133611716..8affc93d29 100644
--- a/src/ifcfm/ifcfm/__main__.py
+++ b/src/ifcfm/ifcfm/__main__.py
@@ -16,10 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcFM. If not, see .
-import ifcfm
import argparse
+
import ifcopenshell
+import ifcfm
+
parser = argparse.ArgumentParser(description="Extracts FM data from IFC to spreadsheets")
parser.add_argument(
"-p",
diff --git a/src/ifcfm/ifcfm/basic.py b/src/ifcfm/ifcfm/basic.py
index 62fbdd47e0..7cd5801c6d 100644
--- a/src/ifcfm/ifcfm/basic.py
+++ b/src/ifcfm/ifcfm/basic.py
@@ -16,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcFM. If not, see .
+from typing import Any, Optional, Union
+
import ifcopenshell
import ifcopenshell.util.classification
import ifcopenshell.util.date
@@ -23,7 +25,6 @@ import ifcopenshell.util.element
import ifcopenshell.util.fm
import ifcopenshell.util.placement
import ifcopenshell.util.system
-from typing import Any, Union, Optional
def get_facilities(ifc_file: ifcopenshell.file) -> list[ifcopenshell.entity_instance]:
diff --git a/src/ifcfm/ifcfm/cobie24.py b/src/ifcfm/ifcfm/cobie24.py
index 778d49de79..f4848e1654 100644
--- a/src/ifcfm/ifcfm/cobie24.py
+++ b/src/ifcfm/ifcfm/cobie24.py
@@ -16,6 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcFM. If not, see .
+from collections.abc import Generator
+from typing import Any, Optional, Union
+
import ifcopenshell
import ifcopenshell.geom
import ifcopenshell.util.classification
@@ -26,9 +29,6 @@ import ifcopenshell.util.placement
import ifcopenshell.util.shape
import ifcopenshell.util.system
from ifcopenshell.util.shape_builder import np_matrix_to_euler
-from typing import Any, Union, Optional
-from collections.abc import Generator
-
# The original BIMServer plugin has a function called ifcToCOBie:
# https://github.com/opensourceBIM/COBie-plugins/blob/master/COBieShared/src/org/bimserver/cobie/shared/serialization/COBieTabSerializer.java#L54
diff --git a/src/ifcfm/ifcfm/cobie24legacy.py b/src/ifcfm/ifcfm/cobie24legacy.py
index 6e5eaf84c2..078529e892 100644
--- a/src/ifcfm/ifcfm/cobie24legacy.py
+++ b/src/ifcfm/ifcfm/cobie24legacy.py
@@ -16,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcFM. If not, see .
+from typing import Any, Optional, Union
+
import ifcopenshell
import ifcopenshell.guid
import ifcopenshell.util.classification
@@ -24,8 +26,6 @@ import ifcopenshell.util.element
import ifcopenshell.util.fm
import ifcopenshell.util.placement
import ifcopenshell.util.system
-from typing import Any, Union, Optional
-
# The original BIMServer plugin has a function called ifcToCOBie:
# https://github.com/opensourceBIM/COBie-plugins/blob/master/COBieShared/src/org/bimserver/cobie/shared/serialization/COBieTabSerializer.java#L54
diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py
index b81db34cbc..9d472d3b1d 100644
--- a/src/ifcopenshell-python/ifcopenshell/__init__.py
+++ b/src/ifcopenshell-python/ifcopenshell/__init__.py
@@ -54,13 +54,14 @@ Example:
print(wall.Name)
"""
from __future__ import annotations
+
import os
import sys
-import zipfile
import tempfile
-from pathlib import Path
-from typing import Optional, Union, TYPE_CHECKING, Any, overload, Literal
+import zipfile
from collections.abc import Generator, Sequence
+from pathlib import Path
+from typing import TYPE_CHECKING, Any, Literal, Optional, Union, overload
if TYPE_CHECKING:
import ifcopenshell.express.schema_class
@@ -88,12 +89,10 @@ except Exception:
# `_file`, `_stream` is used only for annotations inside this file,
# see https://github.com/microsoft/pyright/discussions/9065.
-from .file import file as _file
-from .file import file
-
-from .file import rocksdb_lazy_instance
from . import guid
from .entity_instance import entity_instance, register_schema_attributes
+from .file import file, rocksdb_lazy_instance
+from .file import file as _file
from .sql import sqlite, sqlite_entity
# explicitly specify available imported symbols
@@ -110,8 +109,8 @@ __all__ = [
]
try:
- from .stream import stream as _stream, stream_entity
- from .stream import stream
+ from .stream import stream, stream_entity
+ from .stream import stream as _stream
except:
pass
diff --git a/src/ifcopenshell-python/ifcopenshell/api/__init__.py b/src/ifcopenshell-python/ifcopenshell/api/__init__.py
index 85e60be9c2..49c3b471dd 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/__init__.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/__init__.py
@@ -38,14 +38,16 @@ Also see how to `create a simple model from scratch
`_.
"""
-import json
-import numpy
-import inspect
import importlib
-import ifcopenshell
+import inspect
+import json
from collections.abc import Callable
-from typing import Any, Optional, TYPE_CHECKING
from functools import partial
+from typing import TYPE_CHECKING, Any, Optional
+
+import numpy
+
+import ifcopenshell
if TYPE_CHECKING:
import ifcopenshell.api
@@ -187,8 +189,8 @@ def remove_all_listeners():
def extract_docs(module: str, usecase: str) -> dict[str, Any]:
- import typing
import collections
+ import typing
inputs = collections.OrderedDict()
@@ -304,8 +306,8 @@ def wrap_usecase(usecase_path, usecase):
def wrap_usecases(path, name):
"""This developer feature wraps an API module's usecases with listeners."""
- import sys
import pkgutil
+ import sys
module_name = name.split(".")[-1]
module = sys.modules[name]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/aggregate/assign_object.py b/src/ifcopenshell-python/ifcopenshell/api/aggregate/assign_object.py
index 22d027b73b..a7e3e403d8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/aggregate/assign_object.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/aggregate/assign_object.py
@@ -16,14 +16,15 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
+import ifcopenshell.api.geometry
import ifcopenshell.api.owner
import ifcopenshell.api.spatial
-import ifcopenshell.api.geometry
import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.placement
-from typing import Union
def assign_object(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/__init__.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/__init__.py
index 563376485f..790125cb0b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/__init__.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/__init__.py
@@ -47,45 +47,48 @@ Future versions of this API may support:
5. Adding a segment at any location along a curve
"""
+from ._get_segment_start_point_label import register_referent_name_callback
from .add_stationing_referent import add_stationing_referent
from .add_vertical_layout import add_vertical_layout
from .add_zero_length_segment import add_zero_length_segment
-from .create_layout_segment import create_layout_segment
from .create import create
from .create_as_offset_curve import create_as_offset_curve
from .create_as_polyline import create_as_polyline
from .create_by_pi_method import create_by_pi_method
from .create_from_csv import create_from_csv
-from .create_segment_representations import create_segment_representations
+from .create_layout_segment import create_layout_segment
from .create_representation import create_representation
+from .create_segment_representations import create_segment_representations
from .distance_along_from_station import distance_along_from_station
from .get_alignment import get_alignment
from .get_alignment_layout_nest import get_alignment_layout_nest
+from .get_alignment_layouts import get_alignment_layouts
from .get_alignment_segment_nest import get_alignment_segment_nest
from .get_alignment_start_station import get_alignment_start_station
-from .get_curve_segment_transition_code import get_curve_segment_transition_code
-from .get_layout_segments import get_layout_segments
-from .get_horizontal_layout import get_horizontal_layout
-from .get_vertical_layout import get_vertical_layout
-from .get_cant_layout import get_cant_layout
-from .get_alignment_layouts import get_alignment_layouts
from .get_axis_subcontext import get_axis_subcontext
from .get_basis_curve import get_basis_curve
+from .get_cant_layout import get_cant_layout
from .get_child_alignments import get_child_alignments
from .get_curve import get_curve
+from .get_curve_segment_transition_code import get_curve_segment_transition_code
+from .get_horizontal_layout import get_horizontal_layout
from .get_layout_curve import get_layout_curve
+from .get_layout_segments import get_layout_segments
from .get_mapped_segments import get_mapped_segments
from .get_parent_alignment import get_parent_alignment
from .get_referent_nest import get_referent_nest
+from .get_vertical_layout import get_vertical_layout
from .has_zero_length_segment import has_zero_length_segment
-from .layout_horizontal_alignment_by_pi_method import layout_horizontal_alignment_by_pi_method
-from .layout_vertical_alignment_by_pi_method import layout_vertical_alignment_by_pi_method
+from .layout_horizontal_alignment_by_pi_method import (
+ layout_horizontal_alignment_by_pi_method,
+)
+from .layout_vertical_alignment_by_pi_method import (
+ layout_vertical_alignment_by_pi_method,
+)
from .name_segments import name_segments
from .update_fallback_position import update_fallback_position
from .util import *
-from ._get_segment_start_point_label import register_referent_name_callback
-
__all__ = [
"add_stationing_referent",
"add_vertical_layout",
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 4fcadc176e..934e456b57 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
@@ -16,19 +16,27 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import numpy as np
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.alignment
import ifcopenshell.geom
-import ifcopenshell.util.unit
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
-import numpy as np
+import ifcopenshell.util.unit
from ifcopenshell import entity_instance
-
-from ifcopenshell.api.alignment._update_curve_segment_transition_code import _update_curve_segment_transition_code
-from ifcopenshell.api.alignment._map_alignment_horizontal_segment import _map_alignment_horizontal_segment
-from ifcopenshell.api.alignment._map_alignment_vertical_segment import _map_alignment_vertical_segment
-from ifcopenshell.api.alignment._map_alignment_cant_segment import _map_alignment_cant_segment
+from ifcopenshell.api.alignment._map_alignment_cant_segment import (
+ _map_alignment_cant_segment,
+)
+from ifcopenshell.api.alignment._map_alignment_horizontal_segment import (
+ _map_alignment_horizontal_segment,
+)
+from ifcopenshell.api.alignment._map_alignment_vertical_segment import (
+ _map_alignment_vertical_segment,
+)
+from ifcopenshell.api.alignment._update_curve_segment_transition_code import (
+ _update_curve_segment_transition_code,
+)
def _add_curve_segment_to_composite_curve(
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 bb31342efb..999bf2f80f 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
@@ -16,6 +16,11 @@
# 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 numpy as np
+
import ifcopenshell
import ifcopenshell.api.alignment
import ifcopenshell.api.nest
@@ -23,14 +28,11 @@ import ifcopenshell.api.pset
import ifcopenshell.geom
import ifcopenshell.util.alignment
import ifcopenshell.util.unit
-from ifcopenshell import ifcopenshell_wrapper
-import numpy as np
-import math
-from ifcopenshell import entity_instance
-from collections.abc import Sequence
-
+from ifcopenshell import entity_instance, ifcopenshell_wrapper
from ifcopenshell.api.alignment._add_segment_to_curve import _add_segment_to_curve
-from ifcopenshell.api.alignment._get_segment_start_point_label import _get_segment_start_point_label
+from ifcopenshell.api.alignment._get_segment_start_point_label import (
+ _get_segment_start_point_label,
+)
def _add_segment_to_layout(file: ifcopenshell.file, layout: entity_instance, segment: entity_instance) -> None:
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 17be8ec45c..00ac9d6000 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
@@ -21,8 +21,9 @@ 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 _get_segment_start_point_label
+from ifcopenshell.api.alignment._get_segment_start_point_label import (
+ _get_segment_start_point_label,
+)
def _add_zero_length_segment(file: ifcopenshell.file, layout: entity_instance) -> None:
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 d6b070af78..30b91bb0a0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_geometric_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_geometric_representation.py
@@ -16,14 +16,14 @@
# 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
-import math
-from collections.abc import Sequence
-
def _create_geometric_representation(file: ifcopenshell.file, alignment: entity_instance) -> None:
"""
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 402a6c3513..31f0c583aa 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,14 +16,14 @@
# 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
-import math
-from collections.abc import Sequence
-
def _create_offset_curve_representation(
file: ifcopenshell.file, alignment: entity_instance, offsets: Sequence[entity_instance]
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 e8329a5b1a..c745e6b9ac 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_polyline_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_create_polyline_representation.py
@@ -16,14 +16,14 @@
# 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
-import math
-from collections.abc import Sequence
-
def _create_polyline_representation(
file: ifcopenshell.file, alignment: entity_instance, points: Sequence[entity_instance]
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 ccf466828b..27a781c505 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_cant_segment.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_get_cant_segment.py
@@ -16,14 +16,14 @@
# 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
-import math
-from collections.abc import Sequence
-
def _get_cant_segment(horizontal_segment: entity_instance) -> 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 b1bddfb2e6..34b30b9f59 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,10 +16,10 @@
# 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
from collections.abc import Sequence
+import ifcopenshell
+from ifcopenshell import entity_instance
_horizontal_callback = None
_vertical_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 c86edc110e..e5b9ea0381 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
@@ -16,11 +16,12 @@
# 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
from ifcopenshell import entity_instance
from ifcopenshell.api.alignment import get_axis_subcontext
-from collections.abc import Sequence
-import math
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 73802f2318..17de77a7ad 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
@@ -16,14 +16,14 @@
# 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
-from ifcopenshell import entity_instance
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
import ifcopenshell.util
import ifcopenshell.util.unit
-from collections.abc import Sequence
-import math
-
+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 1f8a1ef5d7..e47a50d5ce 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
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-from ifcopenshell import ifcopenshell_wrapper
-from ifcopenshell import entity_instance
-from collections.abc import Sequence
import math
+from collections.abc import Sequence
+
+import ifcopenshell
+from ifcopenshell import entity_instance, ifcopenshell_wrapper
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 59154980dc..5e1c2d0123 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,13 +16,14 @@
# 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
-from ifcopenshell import ifcopenshell_wrapper
import ifcopenshell.geom
-from ifcopenshell import entity_instance
-import numpy as np
-import math
+from ifcopenshell import entity_instance, ifcopenshell_wrapper
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 2ac08a2fbf..bccc7b0213 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_stationing_referent.py
@@ -16,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import numpy as np
+
import ifcopenshell
import ifcopenshell.api.alignment
import ifcopenshell.api.nest
@@ -24,9 +26,7 @@ import ifcopenshell.geom
import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.unit
-from ifcopenshell import entity_instance
-from ifcopenshell import ifcopenshell_wrapper
-import numpy as np
+from ifcopenshell import entity_instance, ifcopenshell_wrapper
def add_stationing_referent(
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 06c1ef9fa8..41daef657c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_layout.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_vertical_layout.py
@@ -17,6 +17,7 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
+import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.alignment
import ifcopenshell.api.geometry
@@ -24,9 +25,7 @@ import ifcopenshell.api.nest
import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.representation
-import ifcopenshell.api
from ifcopenshell import entity_instance
-
from ifcopenshell.api.alignment._add_zero_length_segment import _add_zero_length_segment
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 5b36cddd75..96c3a9c1f2 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
@@ -16,21 +16,30 @@
# 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.api.nest
import ifcopenshell.geom
-import ifcopenshell.util.alignment
-from ifcopenshell import entity_instance
import ifcopenshell.ifcopenshell_wrapper as wrapper
+import ifcopenshell.util.alignment
import ifcopenshell.util.unit
-import numpy as np
-import math
-
-from ifcopenshell.api.alignment._get_segment_start_point_label import _get_segment_start_point_label
-from ifcopenshell.api.alignment._map_alignment_horizontal_segment import _map_alignment_horizontal_segment
-from ifcopenshell.api.alignment._map_alignment_vertical_segment import _map_alignment_vertical_segment
-from ifcopenshell.api.alignment._update_curve_segment_transition_code import _update_curve_segment_transition_code
+from ifcopenshell import entity_instance
+from ifcopenshell.api.alignment._get_segment_start_point_label import (
+ _get_segment_start_point_label,
+)
+from ifcopenshell.api.alignment._map_alignment_horizontal_segment import (
+ _map_alignment_horizontal_segment,
+)
+from ifcopenshell.api.alignment._map_alignment_vertical_segment import (
+ _map_alignment_vertical_segment,
+)
+from ifcopenshell.api.alignment._update_curve_segment_transition_code import (
+ _update_curve_segment_transition_code,
+)
def add_zero_length_segment(file: ifcopenshell.file, layout: entity_instance, include_referent: bool = True) -> bool:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create.py
index cd707920c0..d2682aaad1 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create.py
@@ -21,11 +21,11 @@ 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_geometric_representation import _create_geometric_representation
from ifcopenshell.api.alignment._add_zero_length_segment import _add_zero_length_segment
+from ifcopenshell.api.alignment._create_geometric_representation import (
+ _create_geometric_representation,
+)
def create(
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 a206fda69b..f4bc35773a 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
@@ -16,17 +16,17 @@
# 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
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
-
-from collections.abc import Sequence
+from ifcopenshell.api.alignment._create_offset_curve_representation import (
+ _create_offset_curve_representation,
+)
def create_as_offset_curve(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_polyline.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_polyline.py
index 1048f1fa69..4988a31920 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_polyline.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_polyline.py
@@ -16,18 +16,18 @@
# 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.aggregate
import ifcopenshell.api.alignment
import ifcopenshell.api.nest
import ifcopenshell.util.alignment
-
from ifcopenshell import entity_instance
-
-from ifcopenshell.api.alignment._create_polyline_representation import _create_polyline_representation
-
-import math
-from collections.abc import Sequence
+from ifcopenshell.api.alignment._create_polyline_representation import (
+ _create_polyline_representation,
+)
def _create_layout(file: ifcopenshell.file, alignment: entity_instance, points: Sequence[entity_instance]):
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 55f91b5cbe..09a0f0ecb6 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
@@ -16,12 +16,13 @@
# 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
import ifcopenshell.api.aggregate
import ifcopenshell.api.alignment
import ifcopenshell.api.nest
from ifcopenshell import entity_instance
-from collections.abc import Sequence
def create_by_pi_method(
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 4125f16bfc..ce7192611c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_from_csv.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_from_csv.py
@@ -16,15 +16,14 @@
# 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.api
-from ifcopenshell import entity_instance
-from ifcopenshell.api.alignment import get_axis_subcontext
-
+import csv
from collections.abc import Sequence
-import csv
+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 3f6789fd98..6fd6876e08 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_layout_segment.py
@@ -16,15 +16,15 @@
# 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
+
import ifcopenshell
import ifcopenshell.api.alignment
import ifcopenshell.geom
-from ifcopenshell import entity_instance
-import math
-from ifcopenshell import ifcopenshell_wrapper
-import numpy as np
-from typing import Union
-
+from ifcopenshell import entity_instance, ifcopenshell_wrapper
from ifcopenshell.api.alignment._add_segment_to_layout import _add_segment_to_layout
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_representation.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_representation.py
index c94ee873fa..896108367f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_representation.py
@@ -19,9 +19,10 @@
import ifcopenshell
import ifcopenshell.api.alignment
from ifcopenshell import entity_instance
-
-from ifcopenshell.api.alignment._create_geometric_representation import _create_geometric_representation
from ifcopenshell.api.alignment._add_segment_to_curve import _add_segment_to_curve
+from ifcopenshell.api.alignment._create_geometric_representation import (
+ _create_geometric_representation,
+)
def create_representation(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_segment_representations.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_segment_representations.py
index c6f479e656..d35429ce75 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_segment_representations.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_segment_representations.py
@@ -17,9 +17,9 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
+import ifcopenshell.api.alignment
import ifcopenshell.util.element
import ifcopenshell.util.representation
-import ifcopenshell.api.alignment
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 897ab22da8..4b4a1a17d3 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_alignment_layouts.py
@@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-import ifcopenshell.util
-from ifcopenshell import entity_instance
from collections.abc import Sequence
+import ifcopenshell
+import ifcopenshell.util
import ifcopenshell.util.representation
+from ifcopenshell import entity_instance
def get_alignment_layouts(alignment: entity_instance) -> Sequence[entity_instance]:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_axis_subcontext.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_axis_subcontext.py
index 033c94d9bb..98e6646cc4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_axis_subcontext.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_axis_subcontext.py
@@ -17,8 +17,8 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
-import ifcopenshell.util.representation
import ifcopenshell.api.context
+import ifcopenshell.util.representation
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 b96c830757..0bf28746fe 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_basis_curve.py
@@ -18,9 +18,8 @@
import ifcopenshell
import ifcopenshell.util
-from ifcopenshell import entity_instance
-
import ifcopenshell.util.representation
+from ifcopenshell import entity_instance
def get_basis_curve(alignment: entity_instance) -> 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 c81018ce06..ccc8f01214 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_child_alignments.py
@@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-import ifcopenshell.util
-from ifcopenshell import entity_instance
from collections.abc import Sequence
+import ifcopenshell
+import ifcopenshell.util
import ifcopenshell.util.element
+from ifcopenshell import entity_instance
def get_child_alignments(alignment: entity_instance) -> Sequence[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 aeb018976a..6b1a7172d9 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_curve.py
@@ -18,9 +18,8 @@
import ifcopenshell
import ifcopenshell.util
-from ifcopenshell import entity_instance
-
import ifcopenshell.util.representation
+from ifcopenshell import entity_instance
def get_curve(alignment: entity_instance) -> 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 577b14d709..6711935e6f 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,13 +16,14 @@
# 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
-from ifcopenshell import ifcopenshell_wrapper
import ifcopenshell.geom
-from ifcopenshell import entity_instance
-import numpy as np
-import math
+from ifcopenshell import entity_instance, ifcopenshell_wrapper
def get_curve_segment_transition_code(
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 cae8079f53..34cfd90a1d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_segments.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_layout_segments.py
@@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-import ifcopenshell.util
-from ifcopenshell import entity_instance
from collections.abc import Sequence
+import ifcopenshell
+import ifcopenshell.util
import ifcopenshell.util.element
+from ifcopenshell import entity_instance
def get_layout_segments(layout: entity_instance) -> Sequence[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 12be6d90f1..2e10aa9824 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_mapped_segments.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_mapped_segments.py
@@ -16,10 +16,11 @@
# 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
import ifcopenshell.api.alignment
from ifcopenshell import entity_instance
-from collections.abc import Sequence
def _get_curve_segment_count(segment: entity_instance) -> int:
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 5115f9e37a..333bfc01e5 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/get_parent_alignment.py
@@ -18,9 +18,8 @@
import ifcopenshell
import ifcopenshell.util
-from ifcopenshell import entity_instance
-
import ifcopenshell.util.representation
+from ifcopenshell import entity_instance
def get_parent_alignment(alignment: entity_instance) -> 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 3409fd761b..ed157c3c90 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
@@ -16,15 +16,14 @@
# 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
-
import math
from collections.abc import Sequence
+import ifcopenshell
+import ifcopenshell.api.alignment
import ifcopenshell.util
import ifcopenshell.util.unit
+from ifcopenshell import entity_instance
def layout_horizontal_alignment_by_pi_method(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_vertical_alignment_by_pi_method.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_vertical_alignment_by_pi_method.py
index 73470467af..542237cbc4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_vertical_alignment_by_pi_method.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/layout_vertical_alignment_by_pi_method.py
@@ -16,13 +16,13 @@
# 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
from ifcopenshell import entity_instance
-import math
-from collections.abc import Sequence
-
def layout_vertical_alignment_by_pi_method(
file: ifcopenshell.file, layout: entity_instance, vpoints: Sequence[Sequence[float]], lengths: Sequence[float]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py
index 6cc653fb52..3cd4c05907 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import numpy as np
+
import ifcopenshell
import ifcopenshell.util.placement
from ifcopenshell import entity_instance
-import numpy as np
def update_fallback_position(file: ifcopenshell.file, lp: entity_instance):
diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py
index 389f94576a..144311a3df 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/util.py
@@ -16,20 +16,18 @@
# 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 math
import numpy as np
import ifcopenshell
+import ifcopenshell.api.alignment
import ifcopenshell.geom
import ifcopenshell.guid
import ifcopenshell.template
-from ifcopenshell import entity_instance
-from ifcopenshell import ifcopenshell_wrapper
import ifcopenshell.util
import ifcopenshell.util.alignment
+from ifcopenshell import entity_instance, ifcopenshell_wrapper
def evaluate_representation(shape_rep: entity_instance, dist_along: float) -> np.ndarray:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py b/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py
index 85cd3aa646..2e679fd409 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import sys
+from types import EllipsisType
+from typing import Any, Union
+
import ifcopenshell.api.owner
import ifcopenshell.util.element
-from typing import Any, Union
-from types import EllipsisType
def edit_attributes(file: ifcopenshell.file, product: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/boundary/assign_connection_geometry.py b/src/ifcopenshell-python/ifcopenshell/api/boundary/assign_connection_geometry.py
index 36e55f2d00..f974ea2cd2 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/boundary/assign_connection_geometry.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/boundary/assign_connection_geometry.py
@@ -16,10 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.unit
+from typing import Optional
+
import numpy as np
import numpy.typing as npt
-from typing import Optional
+
+import ifcopenshell.util.unit
from ifcopenshell.util.shape_builder import SequenceOfVectors, V, ifc_safe_vector_type
diff --git a/src/ifcopenshell-python/ifcopenshell/api/boundary/edit_attributes.py b/src/ifcopenshell-python/ifcopenshell/api/boundary/edit_attributes.py
index 6980b1a2dd..ee11094d13 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/boundary/edit_attributes.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/boundary/edit_attributes.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def edit_attributes(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py
index 2932a5bb93..6642e618b4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Any, Union
+
import ifcopenshell
import ifcopenshell.guid
-import ifcopenshell.util.schema
import ifcopenshell.util.date
-from typing import Union, Any
+import ifcopenshell.util.schema
def add_classification(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py b/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py
index 7f3d46bc96..10177821b4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py
@@ -16,12 +16,13 @@
# 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
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.schema
-from typing import Optional, Union, Any
def add_reference(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/edit_classification.py b/src/ifcopenshell-python/ifcopenshell/api/classification/edit_classification.py
index b2091c0eca..133dc1bfc2 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/classification/edit_classification.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/classification/edit_classification.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_classification(
file: ifcopenshell.file, classification: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/edit_reference.py b/src/ifcopenshell-python/ifcopenshell/api/classification/edit_reference.py
index f5a85d40f9..24e670f2f3 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/classification/edit_reference.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/classification/edit_reference.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_reference(
file: ifcopenshell.file, reference: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cogo/__init__.py b/src/ifcopenshell-python/ifcopenshell/api/cogo/__init__.py
index bb1c7c5243..5fdb2bcea0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cogo/__init__.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cogo/__init__.py
@@ -22,8 +22,8 @@ Coordinate Geometry (cogo) functions primarily for survey points and control mon
from .add_survey_point import add_survey_point
from .assign_survey_point import assign_survey_point
-from .edit_survey_point import edit_survey_point
from .bearing2dd import bearing2dd
+from .edit_survey_point import edit_survey_point
__all__ = [
"add_survey_point",
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cogo/add_survey_point.py b/src/ifcopenshell-python/ifcopenshell/api/cogo/add_survey_point.py
index c4a10661d3..20c0852a04 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cogo/add_survey_point.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cogo/add_survey_point.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.spatial
import ifcopenshell.util.representation
from ifcopenshell import entity_instance
-from typing import Union
def add_survey_point(
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 c9a6ba0acc..be9e650ac7 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,10 @@
# 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
-import typing
def assign_survey_point(annotation: entity_instance, survey_point: 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 d2208dc649..3c7d478441 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,10 @@
# 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
-import typing
def edit_survey_point(annotation: entity_instance, x: float, y: float, z: float = 0.0):
diff --git a/src/ifcopenshell-python/ifcopenshell/api/constraint/assign_constraint.py b/src/ifcopenshell-python/ifcopenshell/api/constraint/assign_constraint.py
index ac021840c7..fb6364042a 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/constraint/assign_constraint.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/constraint/assign_constraint.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
-from typing import Union
def assign_constraint(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_metric.py b/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_metric.py
index 3967846759..f788722b75 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_metric.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_metric.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_metric(file: ifcopenshell.file, metric: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edit the attributes of a metric
diff --git a/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_objective.py b/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_objective.py
index 3cd75356a7..cd2b17e66b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_objective.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_objective.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_objective(
file: ifcopenshell.file, objective: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/context/add_context.py b/src/ifcopenshell-python/ifcopenshell/api/context/add_context.py
index a1a7839e09..0a6992ce8d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/context/add_context.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/context/add_context.py
@@ -16,9 +16,10 @@
# 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
import ifcopenshell.util.representation
-from typing import Optional, Any
def add_context(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/context/edit_context.py b/src/ifcopenshell-python/ifcopenshell/api/context/edit_context.py
index 1a7d567c58..15afc571f2 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/context/edit_context.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/context/edit_context.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_context(file: ifcopenshell.file, context: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcGeometricRepresentationContext
diff --git a/src/ifcopenshell-python/ifcopenshell/api/control/assign_control.py b/src/ifcopenshell-python/ifcopenshell/api/control/assign_control.py
index cd7c398a54..69ecb324eb 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/control/assign_control.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/control/assign_control.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
-from typing import Union
def assign_control(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item.py b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item.py
index 70c0cfc06c..1bdae9e9a1 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item.py
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.control
-import ifcopenshell.api.root
-import ifcopenshell.api.nest
-import ifcopenshell.guid
from typing import Optional
+import ifcopenshell.api.control
+import ifcopenshell.api.nest
+import ifcopenshell.api.root
+import ifcopenshell.guid
+
def add_cost_item(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_schedule.py
index 19f0762b69..cc88336cb4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_schedule.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_schedule.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.root
-import ifcopenshell.api.sequence
from datetime import datetime
from typing import Optional
+import ifcopenshell.api.root
+import ifcopenshell.api.sequence
+
def add_cost_schedule(
file: ifcopenshell.file, name: Optional[str] = None, predefined_type: str = "NOTDEFINED"
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py
index 2db09c45f6..20fc24ab37 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.cost
-import ifcopenshell.api.control
from typing import Any
+import ifcopenshell.api.control
+import ifcopenshell.api.cost
+
def assign_cost_item_quantity(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item.py b/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item.py
index fcf298ff7c..af1915d57f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.nest
import ifcopenshell.util.element
-from typing import Union
def copy_cost_item(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item_values.py b/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item_values.py
index 01d0a02976..11e975fd53 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item_values.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item_values.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.element
import ifcopenshell.api.cost
+import ifcopenshell.util.element
def copy_cost_item_values(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item.py
index 813e306bc8..20770fb673 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_cost_item(
file: ifcopenshell.file, cost_item: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item_quantity.py
index 697d028a37..f5713cd33a 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item_quantity.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item_quantity.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_cost_item_quantity(
file: ifcopenshell.file, physical_quantity: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_schedule.py
index d55e93330e..089c2b1336 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_schedule.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_schedule.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_cost_schedule(
file: ifcopenshell.file, cost_schedule: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value.py
index ebc09ed34c..e1be553922 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-import ifcopenshell.util.unit
-import ifcopenshell.util.element
from typing import Any
+import ifcopenshell
+import ifcopenshell.util.element
+import ifcopenshell.util.unit
+
def edit_cost_value(
file: ifcopenshell.file, cost_value: ifcopenshell.entity_instance, attributes: dict[str, Any]
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 2f68a66023..213940904d 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
@@ -16,12 +16,13 @@
# 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.cost
import ifcopenshell.util.cost
-import ifcopenshell.util.unit
import ifcopenshell.util.element
-from typing import Any
+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/document/add_information.py b/src/ifcopenshell-python/ifcopenshell/api/document/add_information.py
index a5018c63cb..572de820a0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/document/add_information.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/document/add_information.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-import ifcopenshell.guid
-import ifcopenshell.api.owner
from typing import Optional
+import ifcopenshell
+import ifcopenshell.api.owner
+import ifcopenshell.guid
+
def add_information(
file: ifcopenshell.file, parent: Optional[ifcopenshell.entity_instance] = None
diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/assign_document.py b/src/ifcopenshell-python/ifcopenshell/api/document/assign_document.py
index a86a178e86..666d7420d1 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/document/assign_document.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/document/assign_document.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Union
def assign_document(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/edit_information.py b/src/ifcopenshell-python/ifcopenshell/api/document/edit_information.py
index 56c1d40df4..c50e74de58 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/document/edit_information.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/document/edit_information.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_information(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/edit_reference.py b/src/ifcopenshell-python/ifcopenshell/api/document/edit_reference.py
index 51ad195bf3..56bd3c8538 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/document/edit_reference.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/document/edit_reference.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_reference(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/drawing/edit_text_literal.py b/src/ifcopenshell-python/ifcopenshell/api/drawing/edit_text_literal.py
index c083960e59..838fbb357a 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/drawing/edit_text_literal.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/drawing/edit_text_literal.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_text_literal(
file: ifcopenshell.file, text_literal: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/feature/add_feature.py b/src/ifcopenshell-python/ifcopenshell/api/feature/add_feature.py
index 5de3f2cf42..cfdff3819c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/feature/add_feature.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/feature/add_feature.py
@@ -17,9 +17,9 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
-import ifcopenshell.api.owner
-import ifcopenshell.api.geometry
import ifcopenshell.api.aggregate
+import ifcopenshell.api.geometry
+import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.placement
diff --git a/src/ifcopenshell-python/ifcopenshell/api/feature/remove_feature.py b/src/ifcopenshell-python/ifcopenshell/api/feature/remove_feature.py
index 6a1d5e5610..ff847b39eb 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/feature/remove_feature.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/feature/remove_feature.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.root
import ifcopenshell.api.aggregate
+import ifcopenshell.api.root
import ifcopenshell.util.element
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_axis_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_axis_representation.py
index 02bd057cc6..b206cc2ef1 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_axis_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_axis_representation.py
@@ -16,8 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Any, Union
+
import ifcopenshell.util.unit
-from typing import Union, Any
COORD = Union[tuple[float, float], tuple[float, float, float]]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_boolean.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_boolean.py
index f5d0a31456..910df42d8c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_boolean.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_boolean.py
@@ -17,9 +17,11 @@
# along with IfcOpenShell. If not, see .
from __future__ import annotations
-import ifcopenshell.util.element
+
from typing import Literal
+import ifcopenshell.util.element
+
def add_boolean(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_door_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_door_representation.py
index fc60a25bbc..a4460ce984 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_door_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_door_representation.py
@@ -17,15 +17,17 @@
# along with IfcOpenShell. If not, see .
from __future__ import annotations
-import ifcopenshell.util.unit
-import ifcopenshell.api.geometry
-import dataclasses
-import numpy as np
-from ifcopenshell.util.shape_builder import ShapeBuilder, V
-from ifcopenshell.api.geometry.add_window_representation import create_ifc_window
-from math import cos, radians
-from typing import Any, Optional, Literal, Union, get_args, overload
+import dataclasses
+from math import cos, radians
+from typing import Any, Literal, Optional, Union, get_args, overload
+
+import numpy as np
+
+import ifcopenshell.api.geometry
+import ifcopenshell.util.unit
+from ifcopenshell.api.geometry.add_window_representation import create_ifc_window
+from ifcopenshell.util.shape_builder import ShapeBuilder, V
DOOR_TYPE = Literal[
"SINGLE_SWING_LEFT",
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_mesh_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_mesh_representation.py
index 9a4b41a4df..91f816041f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_mesh_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_mesh_representation.py
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.unit
+from typing import Optional, TypeVar
+
import numpy as np
import numpy.typing as npt
-from ifcopenshell.util.shape_builder import ShapeBuilder, SequenceOfVectors, VectorType
-from typing import Optional, TypeVar
+
+import ifcopenshell.util.unit
+from ifcopenshell.util.shape_builder import SequenceOfVectors, ShapeBuilder, VectorType
T = TypeVar("T")
COORD_3D = tuple[float, float, float]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_profile_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_profile_representation.py
index 9458131046..754b7ded03 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_profile_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_profile_representation.py
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Any, Literal, Optional, Union, get_args
+
import ifcopenshell.geom
import ifcopenshell.util.element
import ifcopenshell.util.shape
import ifcopenshell.util.unit
from ifcopenshell.util.data import Clipping
-from typing import Any, Union, Optional, Literal, get_args
VECTOR_3D = tuple[float, float, float]
CardinalPointNumeric = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_railing_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_railing_representation.py
index 5f81c51fd0..a3af58dfbf 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_railing_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_railing_representation.py
@@ -16,24 +16,26 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from math import cos, pi, radians, sin, tan
+from typing import Any, Literal, Optional
+
import numpy as np
+from typing_extensions import assert_never
+
import ifcopenshell.util.unit
from ifcopenshell.util.shape_builder import (
+ SequenceOfVectors,
ShapeBuilder,
V,
- SequenceOfVectors,
is_x,
np_angle,
np_angle_signed,
- np_normalized,
- np_to_3d,
- np_normal,
np_intersect_line_line,
np_lerp,
+ np_normal,
+ np_normalized,
+ np_to_3d,
)
-from math import pi, cos, sin, tan, radians
-from typing import Literal, Optional, Any
-from typing_extensions import assert_never
def mm(x: float) -> float:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_representation.py
index 3f3a9881a7..d77655a60c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_representation.py
@@ -16,16 +16,19 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
from __future__ import annotations
-import bpy.types
+
import math
+from typing import TYPE_CHECKING, Any, Literal, Optional, Union
+
import bmesh
-import ifcopenshell.util.shape_builder
-import ifcopenshell.util.unit
+import bpy.types
import numpy as np
import numpy.typing as npt
-from mathutils import Vector, Matrix
-from typing import Union, Optional, Literal, Any, TYPE_CHECKING
-from ifcopenshell.util.shape_builder import ifc_safe_vector_type, VectorType
+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
if TYPE_CHECKING:
import bonsai.tool as tool
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_shape_aspect.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_shape_aspect.py
index 2f4ee941fe..afb8489a4c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_shape_aspect.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_shape_aspect.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def add_shape_aspect(
file: ifcopenshell.file,
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 f6a6f85d1a..284f6e7c30 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_slab_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_slab_representation.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from math import cos, sin
+from typing import Any, Optional, Union
+
import ifcopenshell.util.element
import ifcopenshell.util.unit
from ifcopenshell.util.data import Clipping
-from math import sin, cos
-from typing import Any, Optional, Union
def add_slab_representation(
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 53e2f58660..4c108dc7df 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_wall_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_wall_representation.py
@@ -16,10 +16,11 @@
# 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 typing import Any, Optional, Union
+
import ifcopenshell.util.element
import ifcopenshell.util.unit
-from math import sin, cos, pi
-from typing import Optional, Union, Any
from ifcopenshell.util.data import Clipping
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py
index d1ef540ab0..36848e7883 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py
@@ -17,14 +17,16 @@
# along with IfcOpenShell. If not, see .
from __future__ import annotations
-import numpy as np
+
import dataclasses
+from itertools import chain
+from typing import Any, Literal, Optional, Union, overload
+
+import numpy as np
+
import ifcopenshell.api.geometry
import ifcopenshell.util.unit
-from itertools import chain
from ifcopenshell.util.shape_builder import ShapeBuilder, V
-from typing import Any, Optional, Literal, Union, overload
-
# SCHEMAS describe panels setup
# where:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/assign_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/assign_representation.py
index 5b62fd4639..158f0152ac 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/assign_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/assign_representation.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.owner
-import ifcopenshell.api.geometry
-import ifcopenshell.util.element
from typing import Any
+import ifcopenshell.api.geometry
+import ifcopenshell.api.owner
+import ifcopenshell.util.element
+
def assign_representation(
file: ifcopenshell.file, product: ifcopenshell.entity_instance, representation: ifcopenshell.entity_instance
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_element.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_element.py
index f737b54c77..1222d458a2 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_element.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_element.py
@@ -16,11 +16,12 @@
# 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
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Optional
def connect_element(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_path.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_path.py
index 81fa276a2c..3135bef116 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_path.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_path.py
@@ -16,11 +16,12 @@
# 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
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Optional
def connect_path(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_wall.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_wall.py
index 8666a38693..c63139b451 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_wall.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/connect_wall.py
@@ -16,13 +16,15 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Optional
+
import numpy as np
+
import ifcopenshell
import ifcopenshell.api.geometry
import ifcopenshell.util.placement
import ifcopenshell.util.representation
import ifcopenshell.util.shape_builder
-from typing import Optional
def connect_wall(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/create_2pt_wall.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/create_2pt_wall.py
index 3401b29c7a..72449ada84 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/create_2pt_wall.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/create_2pt_wall.py
@@ -16,10 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Any
+
import numpy as np
+
import ifcopenshell.api.geometry
import ifcopenshell.util.unit
-from typing import Any
def create_2pt_wall(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/disconnect_path.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/disconnect_path.py
index 787f7a5633..6e04a9df73 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/disconnect_path.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/disconnect_path.py
@@ -16,10 +16,11 @@
# 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
import ifcopenshell.api
import ifcopenshell.util.element
-from typing import Optional
def disconnect_path(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/edit_object_placement.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/edit_object_placement.py
index 2e37e99e26..7fbe44ce12 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/edit_object_placement.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/edit_object_placement.py
@@ -16,14 +16,16 @@
# 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
+
import numpy as np
import numpy.typing as npt
+
import ifcopenshell.api.owner
-import ifcopenshell.util.unit
import ifcopenshell.util.element
import ifcopenshell.util.placement
+import ifcopenshell.util.unit
from ifcopenshell.util.shape_builder import ShapeBuilder
-from typing import Optional, Union, Any
NPArrayOfFloats = npt.NDArray[np.float64]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/regenerate_wall_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/regenerate_wall_representation.py
index 0cce951810..9143577438 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/regenerate_wall_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/regenerate_wall_representation.py
@@ -17,7 +17,12 @@
# along with IfcOpenShell. If not, see .
import json
+from collections import namedtuple
+from math import cos, sin
+from typing import Optional
+
import numpy as np
+
import ifcopenshell
import ifcopenshell.api.context
import ifcopenshell.api.geometry
@@ -26,9 +31,6 @@ import ifcopenshell.util.placement
import ifcopenshell.util.representation
import ifcopenshell.util.shape_builder
import ifcopenshell.util.unit
-from collections import namedtuple
-from math import sin, cos
-from typing import Optional
# https://stackoverflow.com/a/9184560/9627415
# Possible optimisation to linalg.norm?
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/unassign_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/unassign_representation.py
index 5dc3bf3aeb..db4f231aff 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/unassign_representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/unassign_representation.py
@@ -16,9 +16,10 @@
# 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.util.element
-from typing import Any
def unassign_representation(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/validate_type.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/validate_type.py
index b5970e4d44..46bec8757b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/geometry/validate_type.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/validate_type.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell.api.geometry
import ifcopenshell.util.representation
-from typing import Union
def validate_type(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py
index 0d4da93bcb..070797356b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py
@@ -16,10 +16,11 @@
# 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
import ifcopenshell.api.pset
import ifcopenshell.util.element
-from typing import Optional, Any
def edit_georeferencing(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_true_north.py b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_true_north.py
index 0a7e967fbd..5a39f917f4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_true_north.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_true_north.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Optional, Union
+
import ifcopenshell
import ifcopenshell.util.element
import ifcopenshell.util.geolocation
-from typing import Union, Optional
def edit_true_north(file: ifcopenshell.file, true_north: Optional[Union[tuple[float, float], float]] = 0.0) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_wcs.py b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_wcs.py
index 25fb4f3b6e..126072e254 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_wcs.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_wcs.py
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from math import cos, radians, sin
+
+import numpy as np
+
import ifcopenshell
import ifcopenshell.util.element
import ifcopenshell.util.unit
-import numpy as np
from ifcopenshell.util.shape_builder import ShapeBuilder
-from math import sin, cos, radians
def edit_wcs(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/grid/__init__.py b/src/ifcopenshell-python/ifcopenshell/api/grid/__init__.py
index cc759ce7e0..4d821057da 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/grid/__init__.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/grid/__init__.py
@@ -22,7 +22,6 @@ A grid in IFC may contain two or more axes running in two or more directions.
"""
from .. import wrap_usecases
-
from .create_axis_curve import create_axis_curve
from .create_grid_axis import create_grid_axis
from .remove_grid_axis import remove_grid_axis
diff --git a/src/ifcopenshell-python/ifcopenshell/api/grid/create_axis_curve.py b/src/ifcopenshell-python/ifcopenshell/api/grid/create_axis_curve.py
index b87eea94d0..a71c523c3f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/grid/create_axis_curve.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/grid/create_axis_curve.py
@@ -17,12 +17,19 @@
# along with IfcOpenShell. If not, see .
from __future__ import annotations
+
+import numpy as np
+
import ifcopenshell
import ifcopenshell.util.element
-import ifcopenshell.util.unit
import ifcopenshell.util.placement
-import numpy as np
-from ifcopenshell.util.shape_builder import VectorType, V, ifc_safe_vector_type, np_apply_matrix
+import ifcopenshell.util.unit
+from ifcopenshell.util.shape_builder import (
+ V,
+ VectorType,
+ ifc_safe_vector_type,
+ np_apply_matrix,
+)
def create_axis_curve(
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 77228434b0..7500ab1f55 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/grid/create_grid_axis.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/grid/create_grid_axis.py
@@ -15,8 +15,9 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Literal, Optional
+
import ifcopenshell
-from typing import Optional, Literal
def create_grid_axis(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py
index a2a877ef6e..4dd10adfe3 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py
@@ -16,10 +16,11 @@
# 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
import ifcopenshell.api.owner
import ifcopenshell.guid
-from typing import Optional
def add_group(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py
index cb9cd95fea..544a889cc0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
-from typing import Union
def assign_group(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py
index 5a7a2b2018..55ee85e0f8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_group(file: ifcopenshell.file, group: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcGroup
diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py
index 8a3c1dc95f..cd61465326 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def add_layer(file: ifcopenshell.file, name: str = "Unnamed") -> ifcopenshell.entity_instance:
"""Adds a new layer
diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer_with_style.py b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer_with_style.py
index f3af61a81c..ffdf67fec0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer_with_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/layer/add_layer_with_style.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-from typing import Union, Literal
from collections.abc import Sequence
+from typing import Literal, Union
+
+import ifcopenshell
IfcLogical = Union[bool, Literal["UNKNOWN"]]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/edit_layer.py b/src/ifcopenshell-python/ifcopenshell/api/layer/edit_layer.py
index 7203fabb0c..5e51b1ec39 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/layer/edit_layer.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/layer/edit_layer.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_layer(file: ifcopenshell.file, layer: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcPresentationLayerAssignment
diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py b/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py
index a8ce0690d4..debdded93a 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py
@@ -17,8 +17,8 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
-import ifcopenshell.util.schema
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/library/assign_reference.py b/src/ifcopenshell-python/ifcopenshell/api/library/assign_reference.py
index a9b6169304..2d0cb59906 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/library/assign_reference.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/library/assign_reference.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Union
def assign_reference(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/edit_library.py b/src/ifcopenshell-python/ifcopenshell/api/library/edit_library.py
index 4e12195bda..430ddc96a2 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/library/edit_library.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/library/edit_library.py
@@ -15,11 +15,12 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-import ifcopenshell.util.date
import datetime
from typing import Any
+import ifcopenshell
+import ifcopenshell.util.date
+
def edit_library(file: ifcopenshell.file, library: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcLibraryInformation
diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/edit_reference.py b/src/ifcopenshell-python/ifcopenshell/api/library/edit_reference.py
index e6acacbd8f..7860c41943 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/library/edit_reference.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/library/edit_reference.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_reference(
file: ifcopenshell.file, reference: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/unassign_reference.py b/src/ifcopenshell-python/ifcopenshell/api/library/unassign_reference.py
index 5dd40749b9..5190b91ccb 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/library/unassign_reference.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/library/unassign_reference.py
@@ -17,8 +17,8 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
-import ifcopenshell.util.element
import ifcopenshell.api.owner
+import ifcopenshell.util.element
def unassign_reference(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_constituent.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_constituent.py
index 3a2dad4ba2..057ff0849e 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/add_constituent.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_constituent.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def add_constituent(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_layer.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_layer.py
index 5fae2ed275..db717528ec 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/add_layer.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_layer.py
@@ -15,9 +15,10 @@
#
# 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
import ifcopenshell.util.unit
-from typing import Optional
def add_layer(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_material.py
index 6b04f78be2..87f5e4cdb4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/add_material.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_material.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def add_material(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_material_set.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_material_set.py
index bd23688ac8..f679d4c8f0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/add_material_set.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_material_set.py
@@ -15,9 +15,9 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Literal
+import ifcopenshell
MATERIAL_SET_TYPE = Literal[
"IfcMaterialLayerSet",
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_profile.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_profile.py
index 160f79e453..87746cee30 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/add_profile.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_profile.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def add_profile(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py
index 0e37eef148..47c888bb1c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py
@@ -16,14 +16,15 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from collections import defaultdict
+from typing import Any, Optional, Union
+
import ifcopenshell
-import ifcopenshell.api.owner
import ifcopenshell.api.material
+import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.representation
-from collections import defaultdict
-from typing import Optional, Union, Any
def assign_material(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py b/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py
index ce269dbc86..23a5a216b8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.representation
from typing import Any
+import ifcopenshell.util.representation
+
def assign_profile(
file: ifcopenshell.file, material_profile: ifcopenshell.entity_instance, profile: ifcopenshell.entity_instance
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_assigned_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_assigned_material.py
index 9a01322743..09886c90fd 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_assigned_material.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_assigned_material.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_assigned_material(
file: ifcopenshell.file, element: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_constituent.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_constituent.py
index a7398ca5f0..165a3655d5 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_constituent.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_constituent.py
@@ -15,8 +15,9 @@
#
# 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
-from typing import Optional, Any
def edit_constituent(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer.py
index 68f3c6d832..b21530faa3 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer.py
@@ -15,8 +15,9 @@
#
# 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
-from typing import Optional, Any
def edit_layer(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer_usage.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer_usage.py
index 9d1ffb14ec..35916f9c50 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer_usage.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer_usage.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_layer_usage(file: ifcopenshell.file, usage: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcMaterialLayerSetUsage
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_material.py
index ddf541503c..749f3b0ea0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_material.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_material.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_material(file: ifcopenshell.file, material: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcMaterial"""
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile.py
index 3bc7479388..5dec072609 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile.py
@@ -18,6 +18,7 @@
from typing import Any, Optional
+
import ifcopenshell
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile_usage.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile_usage.py
index 4c004ecfdd..2d7cdcbca8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile_usage.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile_usage.py
@@ -15,11 +15,12 @@
#
# 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.geom
import ifcopenshell.util.representation
import ifcopenshell.util.shape
from ifcopenshell.geom import ShapeType
-from typing import Any
def edit_profile_usage(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/set_shape_aspect_constituents.py b/src/ifcopenshell-python/ifcopenshell/api/material/set_shape_aspect_constituents.py
index d95f877fcf..bd0fdf9683 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/set_shape_aspect_constituents.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/set_shape_aspect_constituents.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.style
import ifcopenshell.api.material
+import ifcopenshell.api.style
import ifcopenshell.util.element
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 51d11b3248..00a39a4120 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py
@@ -16,10 +16,11 @@
# 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
import ifcopenshell.util.element
-from typing import Any
def unassign_material(file: ifcopenshell.file, products: list[ifcopenshell.entity_instance]) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/nest/assign_object.py b/src/ifcopenshell-python/ifcopenshell/api/nest/assign_object.py
index 290ac58b05..d3432b617f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/nest/assign_object.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/nest/assign_object.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Union
def assign_object(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_actor.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_actor.py
index 1456a99d5e..8b3a8306fd 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_actor.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_actor.py
@@ -17,10 +17,10 @@
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-import ifcopenshell.api.root
from typing import Literal
+import ifcopenshell
+import ifcopenshell.api.root
ACTOR_TYPE = Literal["IfcActor", "IfcOccupant"]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_address.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_address.py
index 791f41c6a2..7d40e9a420 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_address.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_address.py
@@ -15,9 +15,9 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Literal
+import ifcopenshell
ADDRESS_TYPE = Literal["IfcPostalAddress", "IfcTelecomAddress"]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py
index 665bebc292..8387ecf871 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py
@@ -16,10 +16,11 @@
# 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
+
import ifcopenshell.api
import ifcopenshell.api.owner
import ifcopenshell.api.pset
-from typing import Optional, Any, Union
def add_application(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/create_owner_history.py b/src/ifcopenshell-python/ifcopenshell/api/owner/create_owner_history.py
index 296834062e..39b118446c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/create_owner_history.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/create_owner_history.py
@@ -17,9 +17,10 @@
# along with IfcOpenShell. If not, see .
import time
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner.settings
-from typing import Union
def create_owner_history(file: ifcopenshell.file) -> Union[ifcopenshell.entity_instance, None]:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_actor.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_actor.py
index 8ad238f994..e976d9e09e 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_actor.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_actor.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_actor(file: ifcopenshell.file, actor: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcActor
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_address.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_address.py
index 52e80d6ef1..d274989eec 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_address.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_address.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_address(file: ifcopenshell.file, address: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcAddress
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_application.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_application.py
index 3224169ff2..631265f522 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_application.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_application.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_application(
file: ifcopenshell.file, application: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_organisation.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_organisation.py
index a2bb5e3eb6..2f0a8af568 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_organisation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_organisation.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_organisation(
file: ifcopenshell.file, organisation: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_person.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_person.py
index 6b697bd674..3c53fabdd4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_person.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_person.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_person(file: ifcopenshell.file, person: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcPerson
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_role.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_role.py
index fca80a16b0..8fb293c151 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_role.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_role.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_role(file: ifcopenshell.file, role: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcActorRole
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_organisation.py b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_organisation.py
index acee11d9f5..fa5434d289 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_organisation.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_organisation.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.root
import ifcopenshell.api.owner
+import ifcopenshell.api.root
def remove_organisation(file: ifcopenshell.file, organisation: ifcopenshell.entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person.py b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person.py
index 0c618c1e74..4fc86d70c8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.root
import ifcopenshell.api.owner
+import ifcopenshell.api.root
def remove_person(file: ifcopenshell.file, person: ifcopenshell.entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/settings.py b/src/ifcopenshell-python/ifcopenshell/api/owner/settings.py
index b5dedfff49..035107da73 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/settings.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/settings.py
@@ -19,9 +19,10 @@
# Note: it is the intent for you to override these with your own functions
-import ifcopenshell
from typing import Union
+import ifcopenshell
+
def get_application(ifc: ifcopenshell.file) -> Union[ifcopenshell.entity_instance, None]:
"""Returns the application representing the authoring software
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 99ec6f18d5..7df304778a 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py
@@ -17,11 +17,12 @@
# along with IfcOpenShell. If not, see .
import time
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.owner.settings
import ifcopenshell.util.element
-from typing import Union
def update_owner_history(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile.py b/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile.py
index 80f3b8cf71..5874986031 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile.py
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import numpy.typing as npt
-import ifcopenshell.util.unit
-from ifcopenshell.util.shape_builder import V, SequenceOfVectors, ifc_safe_vector_type
from typing import Optional, Union
+import numpy.typing as npt
+
+import ifcopenshell.util.unit
+from ifcopenshell.util.shape_builder import SequenceOfVectors, V, ifc_safe_vector_type
+
def add_arbitrary_profile(
file: ifcopenshell.file, profile: SequenceOfVectors, name: Optional[str] = None
diff --git a/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile_with_voids.py b/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile_with_voids.py
index b813a3c65f..5a78cd400f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile_with_voids.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile_with_voids.py
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.unit
-import numpy.typing as npt
-from ifcopenshell.util.shape_builder import SequenceOfVectors, ifc_safe_vector_type, V
from typing import Optional, Union
+import numpy.typing as npt
+
+import ifcopenshell.util.unit
+from ifcopenshell.util.shape_builder import SequenceOfVectors, V, ifc_safe_vector_type
+
def add_arbitrary_profile_with_voids(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/profile/add_parameterized_profile.py b/src/ifcopenshell-python/ifcopenshell/api/profile/add_parameterized_profile.py
index 12c57532b0..02f93a4a20 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/profile/add_parameterized_profile.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/profile/add_parameterized_profile.py
@@ -15,9 +15,9 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Literal
+import ifcopenshell
ProfileType = Literal["AREA", "CURVE"]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/profile/edit_profile.py b/src/ifcopenshell-python/ifcopenshell/api/profile/edit_profile.py
index ba7bc3cfeb..4766f6c59b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/profile/edit_profile.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/profile/edit_profile.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_profile(file: ifcopenshell.file, profile: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcProfileDef
diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py
index 2de3352e79..c3f55d6795 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py
@@ -16,21 +16,21 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from collections.abc import Callable
+from functools import partial
+from typing import Any, Literal, Optional, Union, get_args
+
import ifcopenshell
-import ifcopenshell.ifcopenshell_wrapper as W
-import ifcopenshell.api.geometry
-import ifcopenshell.api.type
-import ifcopenshell.api.project
import ifcopenshell.api.context
+import ifcopenshell.api.geometry
import ifcopenshell.api.owner.settings
+import ifcopenshell.api.project
+import ifcopenshell.api.type
+import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.element
import ifcopenshell.util.geolocation
import ifcopenshell.util.placement
import ifcopenshell.util.unit
-from typing import Optional, Any, Union, Literal, get_args
-from collections.abc import Callable
-from functools import partial
-
APPENDABLE_ASSET = Literal[
"IfcTypeProduct",
diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py b/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py
index 2daa7dc729..35f76ac7bd 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Union
def assign_declaration(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/create_file.py b/src/ifcopenshell-python/ifcopenshell/api/project/create_file.py
index 41bc45fdd5..e122ba766b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/project/create_file.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/project/create_file.py
@@ -17,6 +17,7 @@
# along with IfcOpenShell. If not, see .
import datetime
+
import ifcopenshell
import ifcopenshell.util.schema
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/add_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/add_pset.py
index f1a99bd847..a1075334de 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset/add_pset.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset/add_pset.py
@@ -16,11 +16,12 @@
# 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
import ifcopenshell.api.owner
import ifcopenshell.api.pset
import ifcopenshell.guid
-from typing import Optional, Any
def add_pset(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/add_qto.py b/src/ifcopenshell-python/ifcopenshell/api/pset/add_qto.py
index 695ca21dd8..229a43f4ae 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset/add_qto.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset/add_qto.py
@@ -16,10 +16,11 @@
# 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
import ifcopenshell.guid
-from typing import Any
def add_qto(file: ifcopenshell.file, product: ifcopenshell.entity_instance, name: str) -> ifcopenshell.entity_instance:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/assign_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/assign_pset.py
index ed309944a1..eef7f6e8e9 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset/assign_pset.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset/assign_pset.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Union
def assign_pset(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py
index 35ef9ee6a8..97730760e7 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import datetime
+from typing import Any, Optional, Union
+
import ifcopenshell
import ifcopenshell.util.element
import ifcopenshell.util.pset
-from typing import Optional, Any, Union
def edit_pset(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py
index 54405efdd1..41bd4fbecf 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py
@@ -16,11 +16,13 @@
# 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_extensions import assert_never
+
import ifcopenshell
import ifcopenshell.api.pset
import ifcopenshell.util.pset
-from typing import Optional, Any, Union
-from typing_extensions import assert_never
FLOAT_TYPE_KEYWORDS = (
("Area", ("area",)),
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py
index 39d1987fa4..f9cb427d3b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py
@@ -16,10 +16,11 @@
# 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
import ifcopenshell.guid
import ifcopenshell.util.pset
-from typing import Optional
def add_prop_template(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_prop_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_prop_template.py
index 3677a8e63e..b6ea4e823c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_prop_template.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_prop_template.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_prop_template(
file: ifcopenshell.file, prop_template: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_pset_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_pset_template.py
index d143b5554e..2fdd445f98 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_pset_template.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_pset_template.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_pset_template(
file: ifcopenshell.file, pset_template: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource.py b/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource.py
index 691ad2ec6a..642673f2dc 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.root
+from typing import Optional
+
import ifcopenshell.api.nest
import ifcopenshell.api.project
-from typing import Optional
+import ifcopenshell.api.root
def add_resource(
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 545016bfd2..24815d45e0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_usage.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_usage.py
@@ -17,6 +17,7 @@
# along with IfcOpenShell. If not, see .
import math
+
import ifcopenshell.api
import ifcopenshell.util.constraint
import ifcopenshell.util.date
diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource.py b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource.py
index 3476032c1a..27c27e519e 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_resource(file: ifcopenshell.file, resource: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcResource
diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_quantity.py
index 87a14774d8..18a2877484 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_quantity.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_quantity.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_resource_quantity(
file: ifcopenshell.file, physical_quantity: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_time.py b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_time.py
index 7326a5fd90..45dc7cc5e1 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_time.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_time.py
@@ -16,12 +16,13 @@
# 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.sequence
import ifcopenshell.util.constraint
import ifcopenshell.util.date
import ifcopenshell.util.resource
-from typing import Any
def edit_resource_time(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py b/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py
index 167680bd78..867f25f727 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py
@@ -16,15 +16,16 @@
# 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
import ifcopenshell.api.material
import ifcopenshell.api.root
import ifcopenshell.api.system
-import ifcopenshell.api.geometry
-import ifcopenshell.util.system
import ifcopenshell.util.element
import ifcopenshell.util.placement
-from typing import Any
+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 96a3b130be..6afe5ec3a6 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py
@@ -16,10 +16,11 @@
# 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
import ifcopenshell.api.owner
import ifcopenshell.guid
-from typing import Optional, Any
def create_entity(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py b/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py
index 18ff02b199..c7971bc4f7 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py
@@ -16,6 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Literal, Optional, Union
+
import ifcopenshell
import ifcopenshell.api.aggregate
import ifcopenshell.api.geometry
@@ -23,11 +25,10 @@ import ifcopenshell.api.pset
import ifcopenshell.api.spatial
import ifcopenshell.api.type
import ifcopenshell.guid
-import ifcopenshell.util.representation
-import ifcopenshell.util.type
-import ifcopenshell.util.schema
import ifcopenshell.util.element
-from typing import Optional, Union, Literal
+import ifcopenshell.util.representation
+import ifcopenshell.util.schema
+import ifcopenshell.util.type
def reassign_class(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py b/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py
index df17e3bb69..9f1724d914 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py
@@ -16,14 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.type
-import ifcopenshell.api.grid
-import ifcopenshell.api.feature
-import ifcopenshell.api.root
-import ifcopenshell.api.pset
import ifcopenshell.api.boundary
-import ifcopenshell.api.material
+import ifcopenshell.api.feature
import ifcopenshell.api.geometry
+import ifcopenshell.api.grid
+import ifcopenshell.api.material
+import ifcopenshell.api.pset
+import ifcopenshell.api.root
+import ifcopenshell.api.type
import ifcopenshell.util.element
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_date_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_date_time.py
index 96017a0807..3c029add56 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_date_time.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_date_time.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.date
from datetime import datetime
from typing import Union
+import ifcopenshell.util.date
+
def add_date_time(file: ifcopenshell.file, dt: datetime) -> Union[str, ifcopenshell.entity_instance]:
"""Add a new date time.
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task.py
index 36d7d452b1..b8d0d05c15 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task.py
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.control
-import ifcopenshell.api.root
-import ifcopenshell.api.nest
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+import ifcopenshell.api.control
+import ifcopenshell.api.nest
+import ifcopenshell.api.root
+
def add_task(
file: ifcopenshell.file,
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 41e0785b1d..8a72d2044d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py
@@ -16,12 +16,12 @@
# 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 typing import Optional, Union
+
import ifcopenshell.api
import ifcopenshell.util.date
import ifcopenshell.util.sequence
-from datetime import datetime, time
-from datetime import timedelta
-from typing import Optional, Union
def add_time_period(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_calendar.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_calendar.py
index c530a766de..2be4456f0f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_calendar.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_calendar.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.root
import ifcopenshell.api.project
+import ifcopenshell.api.root
def add_work_calendar(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_plan.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_plan.py
index 75ab9944be..088199c82c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_plan.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_plan.py
@@ -16,13 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.root
-import ifcopenshell.api.project
-import ifcopenshell.api.owner.settings
-import ifcopenshell.api.sequence
from datetime import datetime, time
from typing import Optional, Union
+import ifcopenshell.api.owner.settings
+import ifcopenshell.api.project
+import ifcopenshell.api.root
+import ifcopenshell.api.sequence
+
def add_work_plan(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_schedule.py
index 35fa1052ce..06a3fa9e8f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_schedule.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_schedule.py
@@ -16,14 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.root
-import ifcopenshell.api.project
+from datetime import datetime, time
+from typing import Optional, Union
+
import ifcopenshell.api.aggregate
import ifcopenshell.api.owner.settings
+import ifcopenshell.api.project
+import ifcopenshell.api.root
import ifcopenshell.api.sequence
-from datetime import time
-from datetime import datetime
-from typing import Union, Optional
def add_work_schedule(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_time.py
index 05b4960e09..74317f620f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_time.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_time.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Literal
+import ifcopenshell
+
TIME_TYPE = Literal["WorkingTimes", "ExceptionTimes"]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_work_plan.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_work_plan.py
index 4b2fd704f4..6c4dae83f6 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_work_plan.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_work_plan.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
-import ifcopenshell.api.project
-import ifcopenshell.api.aggregate
from typing import Union
+import ifcopenshell
+import ifcopenshell.api.aggregate
+import ifcopenshell.api.project
+
def assign_work_plan(
file: ifcopenshell.file, work_schedule: ifcopenshell.entity_instance, work_plan: ifcopenshell.entity_instance
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/calculate_task_duration.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/calculate_task_duration.py
index d5f0e5947e..1751f57ec0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/calculate_task_duration.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/calculate_task_duration.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import math
+from typing import Union
+
import ifcopenshell.api.sequence
import ifcopenshell.util.date
import ifcopenshell.util.element
-from typing import Union
def calculate_task_duration(file: ifcopenshell.file, task: ifcopenshell.entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py
index 65cbd5a58a..17f2fa3bd5 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import datetime
+from typing import Optional, Union
+
import ifcopenshell.util.date
import ifcopenshell.util.sequence
from ifcopenshell.util.sequence import DURATION_TYPE
-from typing import Union, Optional
def cascade_schedule(file: ifcopenshell.file, task: ifcopenshell.entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/create_baseline.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/create_baseline.py
index 00764a4f7c..f70ead281f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/create_baseline.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/create_baseline.py
@@ -16,15 +16,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Optional, Union
+
import ifcopenshell
-import ifcopenshell.api.owner
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
-from typing import Optional, Union
def create_baseline(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/duplicate_task.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/duplicate_task.py
index fb79581f6b..db9ed0f7db 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/duplicate_task.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/duplicate_task.py
@@ -17,10 +17,10 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
-import ifcopenshell.guid
import ifcopenshell.api.nest
import ifcopenshell.api.owner
import ifcopenshell.api.sequence
+import ifcopenshell.guid
import ifcopenshell.util.date
import ifcopenshell.util.element
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_lag_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_lag_time.py
index d55bf0e4b5..5bf53eecfa 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_lag_time.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_lag_time.py
@@ -16,9 +16,10 @@
# 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.sequence
import ifcopenshell.util.date
-from typing import Any
def edit_lag_time(file: ifcopenshell.file, lag_time: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_recurrence_pattern.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_recurrence_pattern.py
index 519c5cdf25..4cfdb0f1b6 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_recurrence_pattern.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_recurrence_pattern.py
@@ -16,9 +16,10 @@
# 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.util.sequence
-from typing import Any
def edit_recurrence_pattern(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_sequence.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_sequence.py
index 2686ec5ace..2569d8dab6 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_sequence.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_sequence.py
@@ -16,9 +16,10 @@
# 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.sequence
-from typing import Any
def edit_sequence(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task.py
index 3fa1b88caf..d2a2243805 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_task(file: ifcopenshell.file, task: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcTask
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task_time.py
index ffde70580f..06e266b6dc 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task_time.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task_time.py
@@ -17,12 +17,13 @@
# along with IfcOpenShell. If not, see .
import datetime
-import ifcopenshell.api.sequence
+from typing import Any
+
import ifcopenshell.api.resource
+import ifcopenshell.api.sequence
import ifcopenshell.util.constraint
import ifcopenshell.util.date
import ifcopenshell.util.sequence
-from typing import Any
def edit_task_time(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_calendar.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_calendar.py
index 83e56a4372..7dfb65de3f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_calendar.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_calendar.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_work_calendar(
file: ifcopenshell.file, work_calendar: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_plan.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_plan.py
index 145460e11c..67ed76c255 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_plan.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_plan.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.date
from typing import Any
+import ifcopenshell.util.date
+
def edit_work_plan(
file: ifcopenshell.file, work_plan: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_schedule.py
index 98905b9a1f..158caff06d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_schedule.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_schedule.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.date
from typing import Any
+import ifcopenshell.util.date
+
def edit_work_schedule(
file: ifcopenshell.file, work_schedule: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_time.py
index 7fae8b4c18..0c3f5c625f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_time.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_time.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.date
from typing import Any
+import ifcopenshell.util.date
+
def edit_work_time(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py
index 14e82822e3..bfb68051be 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py
@@ -17,7 +17,9 @@
# along with IfcOpenShell. If not, see .
import datetime
+
import networkx as nx
+
import ifcopenshell.api.sequence
import ifcopenshell.util.date
import ifcopenshell.util.sequence
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_task.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_task.py
index 107dcada2b..d42ad9a7b0 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_task.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_task.py
@@ -17,9 +17,9 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
-import ifcopenshell.api.pset
import ifcopenshell.api.nest
import ifcopenshell.api.project
+import ifcopenshell.api.pset
import ifcopenshell.api.sequence
import ifcopenshell.util.element
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_plan.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_plan.py
index 1d7fd8ce3a..a0218b2074 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_plan.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_plan.py
@@ -17,8 +17,8 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
-import ifcopenshell.api.project
import ifcopenshell.api.aggregate
+import ifcopenshell.api.project
import ifcopenshell.util.element
diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_schedule.py
index d0bc15b0db..e9911e09ba 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_schedule.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_schedule.py
@@ -17,9 +17,9 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
+import ifcopenshell.api.aggregate
import ifcopenshell.api.project
import ifcopenshell.api.sequence
-import ifcopenshell.api.aggregate
import ifcopenshell.util.element
diff --git a/src/ifcopenshell-python/ifcopenshell/api/spatial/assign_container.py b/src/ifcopenshell-python/ifcopenshell/api/spatial/assign_container.py
index 15f59905f6..a98e941776 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/spatial/assign_container.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/spatial/assign_container.py
@@ -16,14 +16,15 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
-import ifcopenshell.guid
-import ifcopenshell.api.owner
-import ifcopenshell.api.geometry
import ifcopenshell.api.aggregate
+import ifcopenshell.api.geometry
+import ifcopenshell.api.owner
+import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.placement
-from typing import Union
def assign_container(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/spatial/reference_structure.py b/src/ifcopenshell-python/ifcopenshell/api/spatial/reference_structure.py
index 41452244d1..4446971f0d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/spatial/reference_structure.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/spatial/reference_structure.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Union
def reference_structure(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/__init__.py b/src/ifcopenshell-python/ifcopenshell/api/structural/__init__.py
index 9406c5fc12..2baa262432 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/structural/__init__.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/structural/__init__.py
@@ -39,7 +39,9 @@ from .edit_structural_load import edit_structural_load
from .edit_structural_load_case import edit_structural_load_case
from .remove_structural_analysis_model import remove_structural_analysis_model
from .remove_structural_boundary_condition import remove_structural_boundary_condition
-from .remove_structural_connection_condition import remove_structural_connection_condition
+from .remove_structural_connection_condition import (
+ remove_structural_connection_condition,
+)
from .remove_structural_load import remove_structural_load
from .remove_structural_load_case import remove_structural_load_case
from .remove_structural_load_group import remove_structural_load_group
diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_activity.py b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_activity.py
index 466d26526f..ef12a4cb12 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_activity.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_activity.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.root
from typing import Literal
+import ifcopenshell.api.root
+
def add_structural_activity(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_boundary_condition.py b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_boundary_condition.py
index 4e3ac0c1b9..c78bba2b68 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_boundary_condition.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_boundary_condition.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def add_structural_boundary_condition(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_load.py b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_load.py
index ad79a58ce5..6a7d9eb03f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_load.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_load.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api
from typing import Optional
+import ifcopenshell.api
+
def add_structural_load(
file: ifcopenshell.file, name: Optional[str] = None, ifc_class: str = "IfcStructuralLoadLinearForce"
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 dfae40d862..e378b3d984 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
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.group
import ifcopenshell.api.owner
import ifcopenshell.guid
-from typing import Union
def assign_structural_analysis_model(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_analysis_model.py b/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_analysis_model.py
index 65c03eb238..6d9b87b596 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_analysis_model.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_analysis_model.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_structural_analysis_model(
file: ifcopenshell.file, structural_analysis_model: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_boundary_condition.py b/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_boundary_condition.py
index f88eb7fc71..67eaadf46d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_boundary_condition.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_boundary_condition.py
@@ -15,8 +15,9 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Any, Literal, TypedDict, Union
+
import ifcopenshell
-from typing import Any, TypedDict, Literal, Union
class AttributeDict(TypedDict):
diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_load.py b/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_load.py
index faa218a7a3..874db34655 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_load.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_load.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_structural_load(
file: ifcopenshell.file, structural_load: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_load_case.py b/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_load_case.py
index 02948c637d..511ef3fe87 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_load_case.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_load_case.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_structural_load_case(
file: ifcopenshell.file, load_case: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_boundary_condition.py b/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_boundary_condition.py
index d31811a739..6f17b4ffba 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_boundary_condition.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/structural/remove_structural_boundary_condition.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def remove_structural_boundary_condition(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/add_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/add_style.py
index 54e5ffd2a8..3b5c3acef8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/add_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/add_style.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def add_style(
file: ifcopenshell.file, name: Optional[str] = None, ifc_class="IfcSurfaceStyle"
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_style.py
index 55af1b35b2..e4c3f82c9c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_style.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Any, Literal, Optional
+
import ifcopenshell
import ifcopenshell.api.style
-from typing import Any, Optional, Literal
-
SURFACE_STYLE_TYPES = Literal[
"IfcSurfaceStyleShading",
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 89505d1a98..a0765bbf8d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_textures.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_textures.py
@@ -16,9 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any, Optional
+
import ifcopenshell
import ifcopenshell.api
-from typing import TYPE_CHECKING, Optional, Any
if TYPE_CHECKING:
import bpy
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/assign_item_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/assign_item_style.py
index 0712bc2f83..cf8b5dc1a6 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/assign_item_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/assign_item_style.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional, Union
+import ifcopenshell
+
def assign_item_style(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/assign_material_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/assign_material_style.py
index a9050a3379..bccd0568f1 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/assign_material_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/assign_material_style.py
@@ -16,10 +16,11 @@
# 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.style
import ifcopenshell.util.element
-from typing import Any
def assign_material_style(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/assign_representation_styles.py b/src/ifcopenshell-python/ifcopenshell/api/style/assign_representation_styles.py
index b4d0fbe0e5..2182d354c1 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/assign_representation_styles.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/assign_representation_styles.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def assign_representation_styles(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/edit_presentation_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/edit_presentation_style.py
index 7a39629528..a259b7ac83 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/edit_presentation_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/edit_presentation_style.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_presentation_style(
file: ifcopenshell.file, style: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/edit_surface_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/edit_surface_style.py
index 7f7f05948d..681ba6ccf6 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/edit_surface_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/edit_surface_style.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any, Union
+import ifcopenshell
+
def edit_surface_style(
file: ifcopenshell.file, style: ifcopenshell.entity_instance, attributes: dict[str, Any]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py
index 3637dcaca7..cc8045b189 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from collections.abc import Iterable
+
import ifcopenshell.api.style
import ifcopenshell.util.element
-from collections.abc import Iterable
def remove_style(file: ifcopenshell.file, style: ifcopenshell.entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/unassign_representation_styles.py b/src/ifcopenshell-python/ifcopenshell/api/style/unassign_representation_styles.py
index 47a542c1b7..ef2d516fb8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/style/unassign_representation_styles.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/style/unassign_representation_styles.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def unassign_representation_styles(
file: ifcopenshell.file,
diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/add_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/add_port.py
index 5c1ba67bda..3b8348f77b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/system/add_port.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/system/add_port.py
@@ -16,10 +16,11 @@
# 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
import ifcopenshell.api.root
import ifcopenshell.api.system
-from typing import Optional
def add_port(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/assign_flow_control.py b/src/ifcopenshell-python/ifcopenshell/api/system/assign_flow_control.py
index 3b9273acf1..1be4d2c3bd 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/system/assign_flow_control.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/system/assign_flow_control.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.owner
import ifcopenshell.guid
-from typing import Union
def assign_flow_control(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py
index eee8780778..20e2ec26b8 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py
@@ -16,12 +16,13 @@
# 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
import ifcopenshell.api.geometry
+import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.placement
-from typing import Any
def assign_port(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/assign_system.py b/src/ifcopenshell-python/ifcopenshell/api/system/assign_system.py
index 8677f748b4..ee1acff2c4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/system/assign_system.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/system/assign_system.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.group
import ifcopenshell.util.system
-from typing import Union
def assign_system(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py
index d64f5c2064..6c43df1b8b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py
@@ -16,11 +16,12 @@
# 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
import ifcopenshell.api.owner
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Optional, Any
def connect_port(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/edit_system.py b/src/ifcopenshell-python/ifcopenshell/api/system/edit_system.py
index c90894ec7f..0615025f4c 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/system/edit_system.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/system/edit_system.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_system(file: ifcopenshell.file, system: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcSystem
diff --git a/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py b/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py
index f412d4dd2e..2c7abcd169 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py
@@ -16,13 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Union
+
import ifcopenshell
-import ifcopenshell.api.type
-import ifcopenshell.api.owner
import ifcopenshell.api.material
+import ifcopenshell.api.owner
+import ifcopenshell.api.type
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Union
def assign_type(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/__init__.py b/src/ifcopenshell-python/ifcopenshell/api/unit/__init__.py
index 4245b49c37..31ed3d0ddc 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/__init__.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/__init__.py
@@ -26,9 +26,9 @@ equipment.
from .. import wrap_usecases
from .add_context_dependent_unit import add_context_dependent_unit
from .add_conversion_based_unit import add_conversion_based_unit
+from .add_derived_unit import add_derived_unit
from .add_monetary_unit import add_monetary_unit
from .add_si_unit import add_si_unit
-from .add_derived_unit import add_derived_unit
from .assign_unit import assign_unit
from .edit_derived_unit import edit_derived_unit
from .edit_monetary_unit import edit_monetary_unit
diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/add_conversion_based_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/add_conversion_based_unit.py
index 6a4f17f8fd..b223f7cc46 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/add_conversion_based_unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/add_conversion_based_unit.py
@@ -16,9 +16,10 @@
# 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
import ifcopenshell.util.unit
-from typing import Optional
def add_conversion_based_unit(
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 aba4388010..5cd167e66d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/add_derived_unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/add_derived_unit.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.unit
from typing import Any, Optional
+import ifcopenshell.util.unit
+
def add_derived_unit(
file: ifcopenshell.file, unit_type: str, userdefinedtype: str, attributes: dict[ifcopenshell.entity_instance, int]
diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/add_si_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/add_si_unit.py
index 50da1c10f2..52f79f413b 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/add_si_unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/add_si_unit.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.unit
from typing import Optional
+import ifcopenshell.util.unit
+
def add_si_unit(
file: ifcopenshell.file, unit_type: str = "LENGTHUNIT", prefix: Optional[str] = None
diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/assign_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/assign_unit.py
index 5861e4248a..7b5c2b6ae4 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/assign_unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/assign_unit.py
@@ -16,9 +16,10 @@
# 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
import ifcopenshell.util.unit
-from typing import Optional, Any
def assign_unit(
diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_derived_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_derived_unit.py
index 5bc9bbd316..6c82e5edad 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_derived_unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_derived_unit.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_derived_unit(file: ifcopenshell.file, unit: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcDerivedUnit
diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_monetary_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_monetary_unit.py
index bccc61afc0..62d3d1186f 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_monetary_unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_monetary_unit.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_monetary_unit(file: ifcopenshell.file, unit: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcMonetaryUnit
diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_named_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_named_unit.py
index 683feb7216..87e3608138 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_named_unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_named_unit.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Any
+import ifcopenshell
+
def edit_named_unit(file: ifcopenshell.file, unit: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
"""Edits the attributes of an IfcNamedUnit
diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/remove_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/remove_unit.py
index a9920e0e5c..36ab2f73a2 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/remove_unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/remove_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.unit
import ifcopenshell.util.element
+import ifcopenshell.util.unit
def remove_unit(file: ifcopenshell.file, unit: ifcopenshell.entity_instance) -> None:
diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/unassign_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/unassign_unit.py
index 443d9d0b1c..db968a960d 100644
--- a/src/ifcopenshell-python/ifcopenshell/api/unit/unassign_unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/api/unit/unassign_unit.py
@@ -15,9 +15,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
from typing import Optional
+import ifcopenshell
+
def unassign_unit(file: ifcopenshell.file, units: Optional[list[ifcopenshell.entity_instance]] = None) -> None:
"""Unassigns units as default units for the project
diff --git a/src/ifcopenshell-python/ifcopenshell/draw.py b/src/ifcopenshell-python/ifcopenshell/draw.py
index e2e38d700b..15ad2ef11f 100644
--- a/src/ifcopenshell-python/ifcopenshell/draw.py
+++ b/src/ifcopenshell-python/ifcopenshell/draw.py
@@ -18,12 +18,17 @@
"""2D drawing generation and serialisation"""
-from functools import reduce
import itertools
-import math
import json
+import math
import operator
import warnings
+from collections.abc import Callable, Sequence
+from dataclasses import dataclass, field, fields
+from functools import reduce
+from xml.dom.minidom import parseString
+
+import numpy
import shapely
import ifcopenshell
@@ -31,12 +36,6 @@ import ifcopenshell.geom
import ifcopenshell.util.element
import ifcopenshell.util.selector
-from xml.dom.minidom import parseString
-from dataclasses import dataclass, fields, field
-from collections.abc import Callable, Sequence
-
-import numpy
-
W = ifcopenshell.ifcopenshell_wrapper
WHITE = numpy.array((1.0, 1.0, 1.0))
@@ -670,9 +669,9 @@ def main(
if __name__ == "__main__":
+ import argparse
import sys
import time
- import argparse
times = []
diff --git a/src/ifcopenshell-python/ifcopenshell/entity_instance.py b/src/ifcopenshell-python/ifcopenshell/entity_instance.py
index 0cae2608f3..1dea67b793 100644
--- a/src/ifcopenshell-python/ifcopenshell/entity_instance.py
+++ b/src/ifcopenshell-python/ifcopenshell/entity_instance.py
@@ -18,19 +18,19 @@
from __future__ import annotations
+
import functools
import importlib
-import numbers
import itertools
+import numbers
import operator
import subprocess
import sys
import time
-from typing import Union, Any, TypeVar, overload, TYPE_CHECKING, cast, NoReturn
from collections.abc import Callable, Sequence
+from typing import TYPE_CHECKING, Any, NoReturn, TypeVar, Union, cast, overload
-from . import ifcopenshell_wrapper
-from . import settings
+from . import ifcopenshell_wrapper, settings
if TYPE_CHECKING:
import ifcopenshell
diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py
index 0aadacfbfc..a12d12eb57 100644
--- a/src/ifcopenshell-python/ifcopenshell/file.py
+++ b/src/ifcopenshell-python/ifcopenshell/file.py
@@ -17,25 +17,27 @@
# along with IfcOpenShell. If not, see .
from __future__ import annotations
+
+import functools
+import numbers
import os
import re
-import numbers
import time
-import zipfile
-import functools
-import ifcopenshell
-import weakref
import types
-from pathlib import Path
-from typing import Any, Optional, TYPE_CHECKING, Union, overload, Literal, TypedDict
+import weakref
+import zipfile
from collections.abc import Callable, Generator
+from pathlib import Path
+from typing import TYPE_CHECKING, Any, Literal, Optional, TypedDict, Union, overload
+
from typing_extensions import assert_never
+import ifcopenshell
+from ifcopenshell.util.mvd_info import LARK_AVAILABLE, MvdInfo
+
from . import ifcopenshell_wrapper
from .entity_instance import entity_instance
-from ifcopenshell.util.mvd_info import MvdInfo, LARK_AVAILABLE
-
if TYPE_CHECKING:
import ifcopenshell.util.schema
diff --git a/src/ifcopenshell-python/ifcopenshell/geom/app.py b/src/ifcopenshell-python/ifcopenshell/geom/app.py
index aa11f18c1f..4ee0a5d482 100644
--- a/src/ifcopenshell-python/ifcopenshell/geom/app.py
+++ b/src/ifcopenshell-python/ifcopenshell/geom/app.py
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import functools
+import multiprocessing
+import operator
import os
import sys
import time
-import operator
-import functools
-import multiprocessing
+
import ifcopenshell.ifcopenshell_wrapper as W
try:
@@ -33,7 +34,7 @@ except ImportError:
USE_OCCT_HANDLE = True
-from collections import defaultdict, OrderedDict
+from collections import OrderedDict, defaultdict
from collections.abc import Iterable
try:
@@ -69,11 +70,10 @@ except BaseException:
from OCC.Display.qtDisplay import qtViewer3d
-from .main import settings, iterator
-from .occ_utils import display_shape
-
from .. import open as open_ifc_file
from .. import version as ifcopenshell_version
+from .main import iterator, settings
+from .occ_utils import display_shape
if ifcopenshell_version < "0.6":
# not yet ported
diff --git a/src/ifcopenshell-python/ifcopenshell/geom/code_editor_pane.py b/src/ifcopenshell-python/ifcopenshell/geom/code_editor_pane.py
index f84f45a234..ff46b67d8d 100644
--- a/src/ifcopenshell-python/ifcopenshell/geom/code_editor_pane.py
+++ b/src/ifcopenshell-python/ifcopenshell/geom/code_editor_pane.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import logging
import os
import sys
-import logging
-
from code import InteractiveConsole
+
from PyQt5 import QtCore, QtGui, QtWidgets
try:
@@ -29,14 +29,14 @@ except BaseException:
QtWidgets = QtGui
try:
- from pyqode.core.panels import CheckerPanel
- from pyqode.core import api
- from pyqode.core import modes
- from pyqode.core import panels
+ from pyqode.core import api, modes, panels
from pyqode.core.api import CodeEdit, ColorScheme
- from pyqode.python.modes import PyAutoIndentMode, PythonSH
+ from pyqode.core.panels import CheckerPanel
+ 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 import modes as pymodes, panels as pypanels, widgets
+ from pyqode.python.modes import PyAutoIndentMode, PythonSH
from pyqode.python.widgets import PyInteractiveConsole
has_pyqode = True
diff --git a/src/ifcopenshell-python/ifcopenshell/geom/main.py b/src/ifcopenshell-python/ifcopenshell/geom/main.py
index 0800ac7763..fe31a15d84 100644
--- a/src/ifcopenshell-python/ifcopenshell/geom/main.py
+++ b/src/ifcopenshell-python/ifcopenshell/geom/main.py
@@ -18,18 +18,17 @@
from __future__ import annotations
+
+import operator
import os
import sys
-import operator
-
-from .. import open, ifcopenshell_wrapper
-from ..file import file
-from ..entity_instance import entity_instance
-
-from . import has_occ
-
-from typing import TypeVar, Union, Optional, Any, Literal, overload, TYPE_CHECKING, cast
from collections.abc import Generator, Iterable
+from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union, cast, overload
+
+from .. import ifcopenshell_wrapper, open
+from ..entity_instance import entity_instance
+from ..file import file
+from . import has_occ
if TYPE_CHECKING:
from OCC.Core import TopoDS
diff --git a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py
index 9835b48696..9abddff470 100644
--- a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py
+++ b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py
@@ -18,24 +18,25 @@
from __future__ import annotations
-import inspect
-import random
-import operator
-import warnings
-import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
-from typing import NamedTuple, Any, Union
-from typing_extensions import assert_never
+import inspect
+import operator
+import random
+import warnings
from collections.abc import Iterable
+from typing import Any, NamedTuple, Union
import OCC
+from typing_extensions import assert_never
+
+import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
try:
- from OCC.Core import V3d, TopoDS, gp, AIS, Quantity, BRepTools, Graphic3d
+ from OCC.Core import AIS, BRepTools, Graphic3d, Quantity, TopoDS, V3d, gp
USE_OCCT_HANDLE = False
except ImportError:
- from OCC import V3d, TopoDS, gp, AIS, Quantity, BRepTools, Graphic3d
+ from OCC import AIS, BRepTools, Graphic3d, Quantity, TopoDS, V3d, gp
USE_OCCT_HANDLE = True
diff --git a/src/ifcopenshell-python/ifcopenshell/geom/stats.py b/src/ifcopenshell-python/ifcopenshell/geom/stats.py
index 364083acd7..9266d532d4 100644
--- a/src/ifcopenshell-python/ifcopenshell/geom/stats.py
+++ b/src/ifcopenshell-python/ifcopenshell/geom/stats.py
@@ -1,6 +1,6 @@
import sys
-from typing import Optional, IO
from itertools import accumulate
+from typing import IO, Optional
from . import ifcopenshell_wrapper
diff --git a/src/ifcopenshell-python/ifcopenshell/guid.py b/src/ifcopenshell-python/ifcopenshell/guid.py
index 6e3c6f5b0a..4f6d30332d 100644
--- a/src/ifcopenshell-python/ifcopenshell/guid.py
+++ b/src/ifcopenshell-python/ifcopenshell/guid.py
@@ -47,11 +47,10 @@ cf. .
-import ifcopenshell
-from typing import Any, Union, Literal
+from typing import Any, Literal, Union
+
from typing_extensions import Self
+import ifcopenshell
+
# `std::vector` usually translated to `tuple[xxx, ...]`.
ON_SLABS_AND_WALLS: Any
diff --git a/src/ifcopenshell-python/ifcopenshell/sql.py b/src/ifcopenshell-python/ifcopenshell/sql.py
index e0701cf8ed..dcc170e006 100644
--- a/src/ifcopenshell-python/ifcopenshell/sql.py
+++ b/src/ifcopenshell-python/ifcopenshell/sql.py
@@ -16,19 +16,23 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
from __future__ import annotations
-import re
+
import json
+import re
import types
+from pathlib import Path
+from typing import TYPE_CHECKING, Any, NoReturn, Optional, TypedDict, Union
+
import numpy as np
import numpy.typing as npt
+
import ifcopenshell
import ifcopenshell.util.attribute
import ifcopenshell.util.schema
-from pathlib import Path
-from typing import Any, NoReturn, Union, Optional, TYPE_CHECKING, TypedDict
+
from . import ifcopenshell_wrapper
-from .file import file
from .entity_instance import entity_instance
+from .file import file
if TYPE_CHECKING:
import sqlite3
diff --git a/src/ifcopenshell-python/ifcopenshell/stream.py b/src/ifcopenshell-python/ifcopenshell/stream.py
index 655dc2d9cd..627ebac82c 100644
--- a/src/ifcopenshell-python/ifcopenshell/stream.py
+++ b/src/ifcopenshell-python/ifcopenshell/stream.py
@@ -21,15 +21,16 @@ from __future__ import annotations
try:
import os
import re
+ from typing import Any, NoReturn, Optional, Union
+
+ from lark import Lark, Transformer
import ifcopenshell.util.attribute
import ifcopenshell.util.schema
- from .file import file
+
from . import ifcopenshell_wrapper
from .entity_instance import entity_instance
-
- from lark import Lark, Transformer
- from typing import Any, NoReturn, Union, Optional
+ from .file import file
class StreamTransformer(Transformer):
file: file
diff --git a/src/ifcopenshell-python/ifcopenshell/template.py b/src/ifcopenshell-python/ifcopenshell/template.py
index d31b125279..bd58d0fdef 100644
--- a/src/ifcopenshell-python/ifcopenshell/template.py
+++ b/src/ifcopenshell-python/ifcopenshell/template.py
@@ -19,12 +19,11 @@
import time
import uuid
+from typing import Optional
from .file import file
from .guid import compress
from .ifcopenshell_wrapper import version
-from typing import Optional
-
# A quick way to setup an 'empty' IFC file, taken from:
# http://academy.ifcopenshell.org/creating-a-simple-wall-with-property-set-and-quantity-information/
diff --git a/src/ifcopenshell-python/ifcopenshell/util/alignment.py b/src/ifcopenshell-python/ifcopenshell/util/alignment.py
index ad6c6dd65d..1b90ac7c5f 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/alignment.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/alignment.py
@@ -17,6 +17,7 @@
# along with IfcOpenShell. If not, see .
import math
+
import ifcopenshell
import ifcopenshell.util.unit
diff --git a/src/ifcopenshell-python/ifcopenshell/util/attribute.py b/src/ifcopenshell-python/ifcopenshell/util/attribute.py
index a3212aca67..0e34b5c022 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/attribute.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/attribute.py
@@ -16,8 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Literal, Union
+
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
-from typing import Union, Literal
PrimitiveType = Literal["entity", "string", "float", "integer", "boolean", "enum", "binary"]
ComplexPrimitiveType = Literal["list", "array", "set"]
diff --git a/src/ifcopenshell-python/ifcopenshell/util/brick.py b/src/ifcopenshell-python/ifcopenshell/util/brick.py
index 04e0be5452..ec358c2b98 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/brick.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/brick.py
@@ -16,14 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import os
import json
+import os
+from typing import Union
+
import ifcopenshell
import ifcopenshell.util.classification
import ifcopenshell.util.element
import ifcopenshell.util.system
-from typing import Union
-
cwd = os.path.dirname(os.path.realpath(__file__))
diff --git a/src/ifcopenshell-python/ifcopenshell/util/classification.py b/src/ifcopenshell-python/ifcopenshell/util/classification.py
index 06f9b0e31a..df36eb97a4 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/classification.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/classification.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.element
from typing import Optional
+import ifcopenshell.util.element
+
def get_references(element: ifcopenshell.entity_instance, should_inherit=True) -> set[ifcopenshell.entity_instance]:
"""Gets classification references associated with the element
diff --git a/src/ifcopenshell-python/ifcopenshell/util/constraint.py b/src/ifcopenshell-python/ifcopenshell/util/constraint.py
index 2c370aa997..6d52d74676 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/constraint.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/constraint.py
@@ -18,9 +18,10 @@
#
#
-import ifcopenshell
from typing import Union
+import ifcopenshell
+
def get_constraints(product: ifcopenshell.entity_instance) -> list[ifcopenshell.entity_instance]:
"""
diff --git a/src/ifcopenshell-python/ifcopenshell/util/cost.py b/src/ifcopenshell-python/ifcopenshell/util/cost.py
index a7e96221d9..19172c4710 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/cost.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/cost.py
@@ -16,10 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import lark
-import ifcopenshell
-from typing import Optional, Union, Literal, Any
from collections.abc import Generator
+from typing import Any, Literal, Optional, Union
+
+import lark
+
+import ifcopenshell
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
import ifcopenshell.util.attribute
import ifcopenshell.util.element
diff --git a/src/ifcopenshell-python/ifcopenshell/util/data.py b/src/ifcopenshell-python/ifcopenshell/util/data.py
index c65a87ddb0..4169b1ea4d 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/data.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/data.py
@@ -17,10 +17,13 @@
# along with IfcOpenShell. If not, see .
from __future__ import annotations
-import numpy as np
-import ifcopenshell
-from typing import Any, Union
+
from dataclasses import dataclass
+from typing import Any, Union
+
+import numpy as np
+
+import ifcopenshell
from ifcopenshell.util.shape_builder import ShapeBuilder
diff --git a/src/ifcopenshell-python/ifcopenshell/util/date.py b/src/ifcopenshell-python/ifcopenshell/util/date.py
index 3b0761f75c..dcd1c36ca5 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/date.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/date.py
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
import datetime
-import isodate
from re import findall
+from typing import Any, Literal, Union, overload
+
+import isodate
from dateutil import parser
-from typing import Literal, Union, Any, overload
+
+import ifcopenshell
def timedelta2duration(timedelta):
diff --git a/src/ifcopenshell-python/ifcopenshell/util/doc.py b/src/ifcopenshell-python/ifcopenshell/util/doc.py
index 41d6189fe4..9c7acf16b7 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/doc.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/doc.py
@@ -16,27 +16,30 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import copy
import json
from pathlib import Path
-import copy
+from typing import Any, Literal, Optional, TypedDict, Union
+
+from typing_extensions import NotRequired
+
import ifcopenshell
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
import ifcopenshell.util.attribute
import ifcopenshell.util.schema
-from typing import Optional, Literal, Any, Union, TypedDict
-from typing_extensions import NotRequired
try:
import glob
- import warnings
- import requests
- import urllib.parse
- from markdown import markdown
- from bs4 import BeautifulSoup, MarkupResemblesLocatorWarning
- import zipfile
- from lxml import etree
import re
import shutil
+ import urllib.parse
+ import warnings
+ import zipfile
+
+ import requests
+ from bs4 import BeautifulSoup, MarkupResemblesLocatorWarning
+ from lxml import etree
+ from markdown import markdown
except:
pass # Only necessary if you're using it to generate the docs database
diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py
index 9421bc9760..149606cb14 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/element.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/element.py
@@ -16,14 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from collections import namedtuple
+from collections.abc import Callable, Generator, Sequence
+from typing import Any, Literal, Optional, Union, overload
+
import ifcopenshell
import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.representation
-from typing import Any, Optional, Union, Literal, overload
-from collections.abc import Callable, Generator, Sequence
-from collections import namedtuple
-
MATERIAL_TYPE = Literal[
"IfcMaterial",
diff --git a/src/ifcopenshell-python/ifcopenshell/util/file.py b/src/ifcopenshell-python/ifcopenshell/util/file.py
index 4875ddf3b7..a874e1ba4d 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/file.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/file.py
@@ -17,7 +17,8 @@
# along with IfcOpenShell. If not, see .
import zipfile
-from typing import IO, Union, TypedDict
+from typing import IO, TypedDict, Union
+
from typing_extensions import NotRequired
diff --git a/src/ifcopenshell-python/ifcopenshell/util/fm.py b/src/ifcopenshell-python/ifcopenshell/util/fm.py
index c9b1977e4e..bfb7391dc3 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/fm.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/fm.py
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import Literal
+
+from typing_extensions import assert_never
+
import ifcopenshell
import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.attribute
-from typing import Literal
-from typing_extensions import assert_never
# COBie actually uses an exclusion list, but this inclusion list is equivalent.
cobie_type_classes = [
diff --git a/src/ifcopenshell-python/ifcopenshell/util/generate_pset_templates.py b/src/ifcopenshell-python/ifcopenshell/util/generate_pset_templates.py
index 44d5bc28cf..87c65e2f28 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/generate_pset_templates.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/generate_pset_templates.py
@@ -18,22 +18,23 @@
RUN_FROM_DEV_REPO = False
-import ifcopenshell.ifcopenshell_wrapper as W
-import ifcopenshell.api.unit
-import ifcopenshell.api.project
-import ifcopenshell.guid
-import ifcopenshell.util.attribute
import glob
import sys
-from pathlib import Path
-from lxml import etree
from itertools import chain
+from pathlib import Path
from typing import cast
+from lxml import etree
+
+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 zipfile
import shutil
+ import zipfile
BASE_MODULE_PATH = Path(__file__).parent
diff --git a/src/ifcopenshell-python/ifcopenshell/util/geolocation.py b/src/ifcopenshell-python/ifcopenshell/util/geolocation.py
index 748ba8f3c3..fba8dfffaf 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/geolocation.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/geolocation.py
@@ -17,12 +17,14 @@
# along with IfcOpenShell. If not, see .
import math
+from decimal import ROUND_HALF_UP, Decimal
+from typing import NamedTuple, Optional, Union
+
import numpy as np
+
import ifcopenshell
import ifcopenshell.util.element
import ifcopenshell.util.placement
-from typing import NamedTuple, Optional, Union
-from decimal import Decimal, ROUND_HALF_UP
MatrixType = ifcopenshell.util.placement.MatrixType
diff --git a/src/ifcopenshell-python/ifcopenshell/util/ifc4x3dev_scrape_data_for_docs.py b/src/ifcopenshell-python/ifcopenshell/util/ifc4x3dev_scrape_data_for_docs.py
index 02e4f1f491..86ab81ef4c 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/ifc4x3dev_scrape_data_for_docs.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/ifc4x3dev_scrape_data_for_docs.py
@@ -17,7 +17,12 @@
# along with IfcOpenShell. If not, see .
try:
- from server import get_resource_path, resource_documentation_builder, process_markdown, R
+ from server import (
+ R,
+ get_resource_path,
+ process_markdown,
+ resource_documentation_builder,
+ )
except ModuleNotFoundError as e:
print(
"ERROR. Failed to import `server.py`.\n"
@@ -26,13 +31,15 @@ except ModuleNotFoundError as e:
raise e
import itertools
-import operator
import json
-import ifcopenshell
+import operator
from collections import Counter
-from bs4 import BeautifulSoup
from typing import Any, Union
+from bs4 import BeautifulSoup
+
+import ifcopenshell
+
# Hacky modified functions from server.py to make parser work
def get_definition_from_md(resource: str, mdc: str) -> str:
diff --git a/src/ifcopenshell-python/ifcopenshell/util/mvd_info.py b/src/ifcopenshell-python/ifcopenshell/util/mvd_info.py
index cae535698e..a3bdb07337 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/mvd_info.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/mvd_info.py
@@ -26,8 +26,8 @@ try:
except ImportError:
LARK_AVAILABLE = False
-from typing import Union
import re
+from typing import Union
if LARK_AVAILABLE:
mvd_grammar = r"""
diff --git a/src/ifcopenshell-python/ifcopenshell/util/placement.py b/src/ifcopenshell-python/ifcopenshell/util/placement.py
index e7e7b99a68..cc37ab9906 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/placement.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/placement.py
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from collections.abc import Iterable
+from typing import Literal, Optional
+
import numpy as np
import numpy.typing as npt
+
import ifcopenshell
-from typing import Literal, Optional
-from collections.abc import Iterable
MatrixType = npt.NDArray[np.float64]
"""`npt.NDArray[np.float64]`"""
diff --git a/src/ifcopenshell-python/ifcopenshell/util/pset.py b/src/ifcopenshell-python/ifcopenshell/util/pset.py
index df906a2e57..68fc84a5b1 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/pset.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/pset.py
@@ -16,15 +16,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import re
import pathlib
+import re
+from functools import lru_cache
+from typing import Literal, NamedTuple, Optional, Union
+
import ifcopenshell
import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.schema
import ifcopenshell.util.type
from ifcopenshell.entity_instance import entity_instance
-from functools import lru_cache
-from typing import Optional, Literal, NamedTuple, Union
templates: dict[ifcopenshell.util.schema.IFC_SCHEMA, "PsetQto"] = {}
diff --git a/src/ifcopenshell-python/ifcopenshell/util/representation.py b/src/ifcopenshell-python/ifcopenshell/util/representation.py
index 10743294b0..f0c2b54fca 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/representation.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/representation.py
@@ -16,15 +16,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from collections.abc import Generator, Sequence
+from typing import Literal, Optional, TypedDict, Union
+
import numpy as np
import numpy.typing as npt
-import ifcopenshell
-import ifcopenshell.util.representation
-import ifcopenshell.util.placement
-import ifcopenshell.util.shape
-from typing import Optional, Union, TypedDict, Literal
-from collections.abc import Generator, Sequence
+import ifcopenshell
+import ifcopenshell.util.placement
+import ifcopenshell.util.representation
+import ifcopenshell.util.shape
CONTEXT_TYPE = Literal["Model", "Plan", "NotDefined"]
REPRESENTATION_IDENTIFIER = Literal[
diff --git a/src/ifcopenshell-python/ifcopenshell/util/resource.py b/src/ifcopenshell-python/ifcopenshell/util/resource.py
index f518a09125..262ddda125 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/resource.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/resource.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.cost
-import ifcopenshell.util.element
-import ifcopenshell.util.date
-from typing import Union, Any
+from typing import Any, Union
+import ifcopenshell.util.cost
+import ifcopenshell.util.date
+import ifcopenshell.util.element
PRODUCTIVITY_PSET_DATA = Union[dict[str, Any], None]
# https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcConstructionResource.htm#Table-7.3.3.7.1.3.H
diff --git a/src/ifcopenshell-python/ifcopenshell/util/schema.py b/src/ifcopenshell-python/ifcopenshell/util/schema.py
index d3d7b65c6a..bdd6d489d0 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/schema.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/schema.py
@@ -16,13 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import os
import json
+import os
import time
+from typing import Any, Literal, Union
+
import ifcopenshell
-import ifcopenshell.util.attribute
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
-from typing import Union, Any, Literal
+import ifcopenshell.util.attribute
# This is highly experimental and incomplete, however, it may work for simple datasets.
diff --git a/src/ifcopenshell-python/ifcopenshell/util/scripts/validate_stub.py b/src/ifcopenshell-python/ifcopenshell/util/scripts/validate_stub.py
index 14b05ed258..2ddf444704 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/scripts/validate_stub.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/scripts/validate_stub.py
@@ -30,6 +30,7 @@ import ast
import difflib
from pathlib import Path
from typing import Union
+
from typing_extensions import assert_never
diff --git a/src/ifcopenshell-python/ifcopenshell/util/selector.py b/src/ifcopenshell-python/ifcopenshell/util/selector.py
index 7b0acfef7f..1508e36e8f 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/selector.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/selector.py
@@ -18,10 +18,16 @@
import re
import sys
+from collections.abc import Iterable
+from decimal import Decimal
+from types import EllipsisType
+from typing import Any, Optional, Union
+
import lark
import numpy as np
-import ifcopenshell.api.pset
+
import ifcopenshell.api.geometry
+import ifcopenshell.api.pset
import ifcopenshell.util
import ifcopenshell.util.attribute
import ifcopenshell.util.classification
@@ -34,11 +40,6 @@ import ifcopenshell.util.schema
import ifcopenshell.util.shape
import ifcopenshell.util.system
import ifcopenshell.util.unit
-from decimal import Decimal
-from typing import Optional, Any, Union
-from collections.abc import Iterable
-from types import EllipsisType
-
filter_elements_grammar = lark.Lark(
"""start: filter_group
diff --git a/src/ifcopenshell-python/ifcopenshell/util/sequence.py b/src/ifcopenshell-python/ifcopenshell/util/sequence.py
index 51f34b7226..518d581657 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/sequence.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/sequence.py
@@ -17,13 +17,13 @@
# along with IfcOpenShell. If not, see .
import datetime
+from collections.abc import Generator
+from functools import cache
+from math import floor
+from typing import Literal, Optional, Union
+
import ifcopenshell.util.date
import ifcopenshell.util.element
-from math import floor
-from functools import cache
-from typing import Union, Literal, Optional
-from collections.abc import Generator
-
DURATION_TYPE = Literal["ELAPSEDTIME", "WORKTIME", "NOTDEFINED"]
RECURRENCE_TYPE = Literal[
diff --git a/src/ifcopenshell-python/ifcopenshell/util/shape.py b/src/ifcopenshell-python/ifcopenshell/util/shape.py
index 75c15b6935..4c41eff9f9 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/shape.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/shape.py
@@ -16,18 +16,20 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import shapely
-import shapely.ops
+from math import cos, radians
+from typing import Literal, Optional, Union
+
import numpy as np
import numpy.typing as npt
+import shapely
+import shapely.ops
+
import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.element
import ifcopenshell.util.placement
import ifcopenshell.util.representation
-from ifcopenshell.util.shape_builder import VectorType
-from math import radians, cos
from ifcopenshell.geom import ShapeElementType
-from typing import Optional, Literal, Union
+from ifcopenshell.util.shape_builder import VectorType
tol = 1e-6
AXIS_LITERAL = Literal["X", "Y", "Z"]
diff --git a/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py b/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py
index 0811b8798c..8c0f3d6ce9 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/shape_builder.py
@@ -17,20 +17,23 @@
# along with IfcOpenShell. If not, see .
from __future__ import annotations
-import numpy as np
-import numpy.typing as npt
+
import collections
import collections.abc
+from collections.abc import Sequence
+from itertools import chain
+from math import atan, cos, degrees, pi, radians, sin, sqrt, tan
+from typing import TYPE_CHECKING, Any, Literal, Optional, Union
+
+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
import ifcopenshell.util.unit
-from math import cos, sin, pi, tan, radians, degrees, atan, sqrt
-from typing import Union, Optional, Literal, Any, TYPE_CHECKING
-from collections.abc import Sequence
-from itertools import chain
PRECISION = 1.0e-5
diff --git a/src/ifcopenshell-python/ifcopenshell/util/system.py b/src/ifcopenshell-python/ifcopenshell/util/system.py
index 832daefc0d..39d9207018 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/system.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/system.py
@@ -17,8 +17,9 @@
# along with IfcOpenShell. If not, see .
+from typing import Literal, Optional, Union
+
import ifcopenshell.util.system
-from typing import Optional, Union, Literal
group_types: dict[str, tuple[str, ...]] = {
"IfcZone": ("IfcZone", "IfcSpace", "IfcSpatialZone"),
diff --git a/src/ifcopenshell-python/ifcopenshell/util/type.py b/src/ifcopenshell-python/ifcopenshell/util/type.py
index ab58814267..86a1ccc7c9 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/type.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/type.py
@@ -16,8 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import os
import json
+import os
+
import ifcopenshell.util.schema
cwd = os.path.dirname(os.path.realpath(__file__))
diff --git a/src/ifcopenshell-python/ifcopenshell/util/unit.py b/src/ifcopenshell-python/ifcopenshell/util/unit.py
index 86254cb826..93d4776df0 100644
--- a/src/ifcopenshell-python/ifcopenshell/util/unit.py
+++ b/src/ifcopenshell-python/ifcopenshell/util/unit.py
@@ -16,14 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from collections.abc import Generator
from fractions import Fraction
from math import pi
from typing import Literal, Optional, Union
-from collections.abc import Generator
import ifcopenshell
-import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
import ifcopenshell.api.unit
+import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
prefixes = {
"EXA": 1e18,
@@ -869,10 +869,10 @@ def iter_element_and_attributes_per_type(ifc_file: ifcopenshell.file, attr_type_
def convert_file_length_units(ifc_file: ifcopenshell.file, target_units: str = "METER") -> ifcopenshell.file:
"""Converts all units in an IFC file to the specified target units. Returns a new file."""
- import ifcopenshell.util.element
- import ifcopenshell.util.geolocation
import ifcopenshell.api.georeference
import ifcopenshell.api.unit
+ import ifcopenshell.util.element
+ import ifcopenshell.util.geolocation
prefix = get_prefix(target_units)
si_unit = get_unit_name(target_units)
diff --git a/src/ifcopenshell-python/ifcopenshell/validate.py b/src/ifcopenshell-python/ifcopenshell/validate.py
index 526d1a1db7..13f148d520 100644
--- a/src/ifcopenshell-python/ifcopenshell/validate.py
+++ b/src/ifcopenshell-python/ifcopenshell/validate.py
@@ -44,23 +44,23 @@ Can be used to run validation on IFC file from the command line:
"""
from __future__ import annotations
+
+import argparse
+import functools
+import json
import os
import sys
-import json
-import functools
import types
-import argparse
-
from collections import namedtuple
-from typing import Union, Any, Optional, TYPE_CHECKING
from collections.abc import Iterator
-from logging import Logger, Handler
+from logging import Handler, Logger
from types import EllipsisType
+from typing import TYPE_CHECKING, Any, Optional, Union
import ifcopenshell
+import ifcopenshell.express.rule_executor
import ifcopenshell.ifcopenshell_wrapper
import ifcopenshell.ifcopenshell_wrapper as W
-import ifcopenshell.express.rule_executor
if TYPE_CHECKING:
import ifcopenshell.simple_spf
@@ -311,8 +311,8 @@ def assert_valid(
def log_internal_cpp_errors(
f: Optional[ifcopenshell.file], filename: str, logger: Union[Logger, json_logger], log_content: Optional[str] = None
) -> None:
- import re
import bisect
+ import re
chr_offset_re = re.compile(r"at offset (\d+)\s*")
for_instance_re = re.compile(r"\s*for instance #(\d+)\s*")
@@ -775,8 +775,8 @@ class LogDetectionHandler(Handler):
if __name__ == "__main__":
- import sys
import logging
+ import sys
def handle_exception(exc_type, exc_value, exc_traceback):
import traceback
diff --git a/src/ifcopenshell-python/test/api/aggregate/test_assign_object.py b/src/ifcopenshell-python/test/api/aggregate/test_assign_object.py
index f00ff6c1d0..e8b41e8dbb 100644
--- a/src/ifcopenshell-python/test/api/aggregate/test_assign_object.py
+++ b/src/ifcopenshell-python/test/api/aggregate/test_assign_object.py
@@ -18,14 +18,15 @@
import numpy
import pytest
-import test.bootstrap
-import ifcopenshell.api.root
-import ifcopenshell.api.unit
-import ifcopenshell.api.spatial
-import ifcopenshell.api.geometry
+
import ifcopenshell.api.aggregate
+import ifcopenshell.api.geometry
+import ifcopenshell.api.root
+import ifcopenshell.api.spatial
+import ifcopenshell.api.unit
import ifcopenshell.util.element
import ifcopenshell.util.placement
+import test.bootstrap
class TestAssignObject(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/aggregate/test_unassign_object.py b/src/ifcopenshell-python/test/api/aggregate/test_unassign_object.py
index 722cccdb93..3d8e25134d 100644
--- a/src/ifcopenshell-python/test/api/aggregate/test_unassign_object.py
+++ b/src/ifcopenshell-python/test/api/aggregate/test_unassign_object.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.aggregate
+import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestUnassignObject(test.bootstrap.IFC4):
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 bea6f8989a..9c6503516a 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
@@ -17,10 +17,10 @@
# along with IfcOpenShell. If not, see .
import pytest
+
import ifcopenshell.api.alignment
import ifcopenshell.api.context
import ifcopenshell.api.unit
-
from ifcopenshell.api.alignment._add_segment_to_layout import _add_segment_to_layout
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 49cbd70367..52786cb28c 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
@@ -17,6 +17,7 @@
# 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_add_vertical_alignment.py b/src/ifcopenshell-python/test/api/alignment/test_add_vertical_alignment.py
index 243188866c..50298717b3 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
@@ -17,6 +17,7 @@
# 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_create.py b/src/ifcopenshell-python/test/api/alignment/test_create.py
index 355c2d1ae5..e9fb2d00f3 100644
--- a/src/ifcopenshell-python/test/api/alignment/test_create.py
+++ b/src/ifcopenshell-python/test/api/alignment/test_create.py
@@ -17,6 +17,7 @@
# 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_create_as_offset_curve.py b/src/ifcopenshell-python/test/api/alignment/test_create_as_offset_curve.py
index 25b2656611..90321574bd 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
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util
-import ifcopenshell.util.unit
-import pytest
import math
+
+import pytest
+
import ifcopenshell.api.alignment
import ifcopenshell.api.unit
+import ifcopenshell.util
+import ifcopenshell.util.unit
def test_create_as_offset_curve():
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 dac7d3156b..8724de5e95 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
@@ -17,6 +17,7 @@
# 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 bd3a25faed..17a7d9b558 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
@@ -17,6 +17,7 @@
# 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_create_layout_segment.py b/src/ifcopenshell-python/test/api/alignment/test_create_layout_segment.py
index 6713f0f78a..87d1ca563f 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
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import math
+
import pytest
+
import ifcopenshell.api.alignment
import ifcopenshell.api.context
import ifcopenshell.api.unit
-import math
def _test_horizontal() -> ifcopenshell.file:
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 15b64af2f9..a8f7c3ac06 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
@@ -17,6 +17,7 @@
# 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_distance_along_from_station.py b/src/ifcopenshell-python/test/api/alignment/test_distance_along_from_station.py
index d5c8518259..a5af19ebe3 100644
--- a/src/ifcopenshell-python/test/api/alignment/test_distance_along_from_station.py
+++ b/src/ifcopenshell-python/test/api/alignment/test_distance_along_from_station.py
@@ -17,6 +17,7 @@
# 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 b1d5ac720e..a7821ce213 100644
--- a/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py
+++ b/src/ifcopenshell-python/test/api/alignment/test_get_alignment.py
@@ -17,6 +17,7 @@
# 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_horizontal_layout_by_pi_method.py b/src/ifcopenshell-python/test/api/alignment/test_horizontal_layout_by_pi_method.py
index a4678f7e0e..75d46ba173 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
@@ -17,6 +17,7 @@
# 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_map_alignment_cant_segment.py b/src/ifcopenshell-python/test/api/alignment/test_map_alignment_cant_segment.py
index 021314547c..2f529fb08a 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
@@ -17,9 +17,12 @@
# along with IfcOpenShell. If not, see .
import pytest
+
import ifcopenshell.api.alignment
import ifcopenshell.api.context
-from ifcopenshell.api.alignment._map_alignment_cant_segment import _map_alignment_cant_segment
+from ifcopenshell.api.alignment._map_alignment_cant_segment import (
+ _map_alignment_cant_segment,
+)
def _BlossCurve_100_0_300_1000_1_Meter(file):
diff --git a/src/ifcopenshell-python/test/api/alignment/test_map_alignment_horizontal_segment.py b/src/ifcopenshell-python/test/api/alignment/test_map_alignment_horizontal_segment.py
index c9bdfc0432..191f56a279 100644
--- a/src/ifcopenshell-python/test/api/alignment/test_map_alignment_horizontal_segment.py
+++ b/src/ifcopenshell-python/test/api/alignment/test_map_alignment_horizontal_segment.py
@@ -20,9 +20,12 @@
# for horizontal alignment.
import pytest
+
import ifcopenshell.api.alignment
import ifcopenshell.api.unit
-from ifcopenshell.api.alignment._map_alignment_horizontal_segment import _map_alignment_horizontal_segment
+from ifcopenshell.api.alignment._map_alignment_horizontal_segment import (
+ _map_alignment_horizontal_segment,
+)
def _BlossCurve_100_0_300_1000_1_Meter(file):
diff --git a/src/ifcopenshell-python/test/api/alignment/test_map_alignment_vertical_segment.py b/src/ifcopenshell-python/test/api/alignment/test_map_alignment_vertical_segment.py
index 2d5f6a6133..fc88aed036 100644
--- a/src/ifcopenshell-python/test/api/alignment/test_map_alignment_vertical_segment.py
+++ b/src/ifcopenshell-python/test/api/alignment/test_map_alignment_vertical_segment.py
@@ -20,8 +20,11 @@
# for vertical alignment.
import pytest
+
import ifcopenshell.api.alignment
-from ifcopenshell.api.alignment._map_alignment_vertical_segment import _map_alignment_vertical_segment
+from ifcopenshell.api.alignment._map_alignment_vertical_segment import (
+ _map_alignment_vertical_segment,
+)
def _CircularArc_100_0_10_0_0_0_0_5_1_Meter(file):
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 5a1174573b..20ed746ab0 100644
--- a/src/ifcopenshell-python/test/api/alignment/test_name_segments.py
+++ b/src/ifcopenshell-python/test/api/alignment/test_name_segments.py
@@ -17,6 +17,7 @@
# 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_referent_names.py b/src/ifcopenshell-python/test/api/alignment/test_referent_names.py
index 2e0e50a683..d18ecf16c3 100644
--- a/src/ifcopenshell-python/test/api/alignment/test_referent_names.py
+++ b/src/ifcopenshell-python/test/api/alignment/test_referent_names.py
@@ -18,6 +18,7 @@
import pytest
from pytest import fixture
+
import ifcopenshell.api.alignment
import ifcopenshell.api.context
import ifcopenshell.api.unit
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 2b6accf037..30803b5a59 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
@@ -17,9 +17,12 @@
# along with IfcOpenShell. If not, see .
import pytest
-from ifcopenshell.api.alignment._update_curve_segment_transition_code import _update_curve_segment_transition_code
+
import ifcopenshell.api.context
import ifcopenshell.api.unit
+from ifcopenshell.api.alignment._update_curve_segment_transition_code import (
+ _update_curve_segment_transition_code,
+)
def _test1():
diff --git a/src/ifcopenshell-python/test/api/alignment/test_update_fallback_position.py b/src/ifcopenshell-python/test/api/alignment/test_update_fallback_position.py
index 2982cb466b..a53c162ea9 100644
--- a/src/ifcopenshell-python/test/api/alignment/test_update_fallback_position.py
+++ b/src/ifcopenshell-python/test/api/alignment/test_update_fallback_position.py
@@ -17,6 +17,7 @@
# 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_vertical_layout_by_pi_method.py b/src/ifcopenshell-python/test/api/alignment/test_vertical_layout_by_pi_method.py
index 8dab67c181..b34e22c741 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
@@ -17,6 +17,7 @@
# 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/boundary/test_copy_boundary.py b/src/ifcopenshell-python/test/api/boundary/test_copy_boundary.py
index 30adbf74c4..675f187c09 100644
--- a/src/ifcopenshell-python/test/api/boundary/test_copy_boundary.py
+++ b/src/ifcopenshell-python/test/api/boundary/test_copy_boundary.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.boundary
+import ifcopenshell.api.root
+import test.bootstrap
class TestCopyBoundary(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/boundary/test_remove_boundary.py b/src/ifcopenshell-python/test/api/boundary/test_remove_boundary.py
index 7dea36b2bc..91227b66a4 100644
--- a/src/ifcopenshell-python/test/api/boundary/test_remove_boundary.py
+++ b/src/ifcopenshell-python/test/api/boundary/test_remove_boundary.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.boundary
+import ifcopenshell.api.root
+import test.bootstrap
class TestRemoveBoundary(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/classification/test_add_classification.py b/src/ifcopenshell-python/test/api/classification/test_add_classification.py
index 12442255fe..f97d32d881 100644
--- a/src/ifcopenshell-python/test/api/classification/test_add_classification.py
+++ b/src/ifcopenshell-python/test/api/classification/test_add_classification.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.classification
+import ifcopenshell.api.root
+import test.bootstrap
class TestAddClassification(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/classification/test_add_reference.py b/src/ifcopenshell-python/test/api/classification/test_add_reference.py
index caf6f5d8af..7aad6996f1 100644
--- a/src/ifcopenshell-python/test/api/classification/test_add_reference.py
+++ b/src/ifcopenshell-python/test/api/classification/test_add_reference.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
-import ifcopenshell.api.root
+
import ifcopenshell.api.classification
+import ifcopenshell.api.root
import ifcopenshell.util.classification
+import test.bootstrap
class TestAddReference(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/classification/test_remove_classification.py b/src/ifcopenshell-python/test/api/classification/test_remove_classification.py
index 15a8b414cb..54d3b8418b 100644
--- a/src/ifcopenshell-python/test/api/classification/test_remove_classification.py
+++ b/src/ifcopenshell-python/test/api/classification/test_remove_classification.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.classification
+import ifcopenshell.api.root
+import test.bootstrap
class TestRemoveClassification(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/classification/test_remove_reference.py b/src/ifcopenshell-python/test/api/classification/test_remove_reference.py
index 6812805594..9bcede5db3 100644
--- a/src/ifcopenshell-python/test/api/classification/test_remove_reference.py
+++ b/src/ifcopenshell-python/test/api/classification/test_remove_reference.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
-import ifcopenshell.api.root
+
import ifcopenshell.api.classification
+import ifcopenshell.api.root
import ifcopenshell.util.classification
+import test.bootstrap
class TestRemoveReference(test.bootstrap.IFC4):
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 068fef52a8..73d3c69105 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
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
+
import ifcopenshell.api.aggregate
import ifcopenshell.api.alignment
-import ifcopenshell.api.context
import ifcopenshell.api.cogo
+import ifcopenshell.api.context
def test_add_survey_point():
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 39e7823af9..e19639166f 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
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
+
import ifcopenshell.api.aggregate
import ifcopenshell.api.alignment
-import ifcopenshell.api.context
import ifcopenshell.api.cogo
+import ifcopenshell.api.context
def test_assign_survey_point():
diff --git a/src/ifcopenshell-python/test/api/cogo/test_bearing2dd.py b/src/ifcopenshell-python/test/api/cogo/test_bearing2dd.py
index 657c0a65a8..433a981ac7 100644
--- a/src/ifcopenshell-python/test/api/cogo/test_bearing2dd.py
+++ b/src/ifcopenshell-python/test/api/cogo/test_bearing2dd.py
@@ -16,10 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import pytest
-import ifcopenshell.api.cogo
import math
+import pytest
+
+import ifcopenshell.api.cogo
+
def test_bearing2dd():
assert 44.743888875 == pytest.approx(ifcopenshell.api.cogo.bearing2dd("N 45 15 22.5 E"))
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 17038f533b..6b714b7342 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
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
+
import ifcopenshell.api.aggregate
import ifcopenshell.api.alignment
-import ifcopenshell.api.context
import ifcopenshell.api.cogo
+import ifcopenshell.api.context
def test_edit_survey_point():
diff --git a/src/ifcopenshell-python/test/api/constraint/test_assign_constraint.py b/src/ifcopenshell-python/test/api/constraint/test_assign_constraint.py
index 41d594098e..f83c00be19 100644
--- a/src/ifcopenshell-python/test/api/constraint/test_assign_constraint.py
+++ b/src/ifcopenshell-python/test/api/constraint/test_assign_constraint.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.constraint
+import ifcopenshell.api.root
import ifcopenshell.util.constraint
+import test.bootstrap
class TestAssignConstraint(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/constraint/test_unassign_constraint.py b/src/ifcopenshell-python/test/api/constraint/test_unassign_constraint.py
index bf311f2870..245ae07e91 100644
--- a/src/ifcopenshell-python/test/api/constraint/test_unassign_constraint.py
+++ b/src/ifcopenshell-python/test/api/constraint/test_unassign_constraint.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.constraint
+import ifcopenshell.api.root
import ifcopenshell.util.constraint
+import test.bootstrap
class TestUnassignConstraint(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/context/test_add_context.py b/src/ifcopenshell-python/test/api/context/test_add_context.py
index 1ae3183697..4e24fe623a 100644
--- a/src/ifcopenshell-python/test/api/context/test_add_context.py
+++ b/src/ifcopenshell-python/test/api/context/test_add_context.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.context
+import test.bootstrap
class TestAddContext(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/context/test_edit_context.py b/src/ifcopenshell-python/test/api/context/test_edit_context.py
index f138b649e1..eead4d1971 100644
--- a/src/ifcopenshell-python/test/api/context/test_edit_context.py
+++ b/src/ifcopenshell-python/test/api/context/test_edit_context.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.context
+import test.bootstrap
class TestEditContext(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/context/test_remove_context.py b/src/ifcopenshell-python/test/api/context/test_remove_context.py
index dbc4185b6c..1dd3e255b4 100644
--- a/src/ifcopenshell-python/test/api/context/test_remove_context.py
+++ b/src/ifcopenshell-python/test/api/context/test_remove_context.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.context
import ifcopenshell.api.geometry
import ifcopenshell.api.root
+import test.bootstrap
class TestRemoveContext(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/control/test_assign_control.py b/src/ifcopenshell-python/test/api/control/test_assign_control.py
index 75c6c0e8d3..a84b8d3ed7 100644
--- a/src/ifcopenshell-python/test/api/control/test_assign_control.py
+++ b/src/ifcopenshell-python/test/api/control/test_assign_control.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.cost
import ifcopenshell.api.control
+import ifcopenshell.api.cost
+import test.bootstrap
class TestAssignControl(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/control/test_unassign_control.py b/src/ifcopenshell-python/test/api/control/test_unassign_control.py
index ecaebdae32..e413847f76 100644
--- a/src/ifcopenshell-python/test/api/control/test_unassign_control.py
+++ b/src/ifcopenshell-python/test/api/control/test_unassign_control.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.cost
import ifcopenshell.api.control
+import ifcopenshell.api.cost
+import test.bootstrap
class TestUnassignControl(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/cost/test_add_cost_item.py b/src/ifcopenshell-python/test/api/cost/test_add_cost_item.py
index c2a3762e78..b473bdc86c 100644
--- a/src/ifcopenshell-python/test/api/cost/test_add_cost_item.py
+++ b/src/ifcopenshell-python/test/api/cost/test_add_cost_item.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.cost
import ifcopenshell.util.element
+import test.bootstrap
class TestAddCostItem(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/cost/test_add_cost_item_quantity.py b/src/ifcopenshell-python/test/api/cost/test_add_cost_item_quantity.py
index e5ffe38ce0..7680e9e376 100644
--- a/src/ifcopenshell-python/test/api/cost/test_add_cost_item_quantity.py
+++ b/src/ifcopenshell-python/test/api/cost/test_add_cost_item_quantity.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import ifcopenshell.api.control
import ifcopenshell.api.cost
import ifcopenshell.api.root
-import ifcopenshell.api.control
+import test.bootstrap
class TestAddCostItemQuantity(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/cost/test_add_cost_schedule.py b/src/ifcopenshell-python/test/api/cost/test_add_cost_schedule.py
index 019bc2b6b4..af138af60a 100644
--- a/src/ifcopenshell-python/test/api/cost/test_add_cost_schedule.py
+++ b/src/ifcopenshell-python/test/api/cost/test_add_cost_schedule.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.cost
+import test.bootstrap
class TestAddCostSchedule(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/cost/test_remove_cost_item.py b/src/ifcopenshell-python/test/api/cost/test_remove_cost_item.py
index a987063769..1bcd60eae9 100644
--- a/src/ifcopenshell-python/test/api/cost/test_remove_cost_item.py
+++ b/src/ifcopenshell-python/test/api/cost/test_remove_cost_item.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.cost
+import test.bootstrap
class TestRemoveCostItem(test.bootstrap.IFC4):
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 309f4b0906..5acadb9673 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,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api
import ifcopenshell.api.cost
+import test.bootstrap
class TestRemoveCostSchedule(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/document/test_add_information.py b/src/ifcopenshell-python/test/api/document/test_add_information.py
index 8dc687652b..ea4846c9a5 100644
--- a/src/ifcopenshell-python/test/api/document/test_add_information.py
+++ b/src/ifcopenshell-python/test/api/document/test_add_information.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.document
+import test.bootstrap
class TestAddInformation(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/document/test_add_reference.py b/src/ifcopenshell-python/test/api/document/test_add_reference.py
index a0420a6d15..dbfbfb474b 100644
--- a/src/ifcopenshell-python/test/api/document/test_add_reference.py
+++ b/src/ifcopenshell-python/test/api/document/test_add_reference.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.document
+import test.bootstrap
class TestAddReference(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/document/test_assign_document.py b/src/ifcopenshell-python/test/api/document/test_assign_document.py
index 2a3051fe4b..336e640a67 100644
--- a/src/ifcopenshell-python/test/api/document/test_assign_document.py
+++ b/src/ifcopenshell-python/test/api/document/test_assign_document.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.document
+import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestAssignDocument(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/document/test_remove_information.py b/src/ifcopenshell-python/test/api/document/test_remove_information.py
index 69e87faece..cee5357fd7 100644
--- a/src/ifcopenshell-python/test/api/document/test_remove_information.py
+++ b/src/ifcopenshell-python/test/api/document/test_remove_information.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.document
+import test.bootstrap
class TestRemoveInformation(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/document/test_remove_reference.py b/src/ifcopenshell-python/test/api/document/test_remove_reference.py
index dd5fde6602..56a6971a76 100644
--- a/src/ifcopenshell-python/test/api/document/test_remove_reference.py
+++ b/src/ifcopenshell-python/test/api/document/test_remove_reference.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.document
+import test.bootstrap
class TestRemoveReference(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/document/test_unassign_document.py b/src/ifcopenshell-python/test/api/document/test_unassign_document.py
index a5671a2b89..167143a949 100644
--- a/src/ifcopenshell-python/test/api/document/test_unassign_document.py
+++ b/src/ifcopenshell-python/test/api/document/test_unassign_document.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.document
+import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestUnassignDocument(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/drawing/test_assign_product.py b/src/ifcopenshell-python/test/api/drawing/test_assign_product.py
index c2464203c0..925afc7073 100644
--- a/src/ifcopenshell-python/test/api/drawing/test_assign_product.py
+++ b/src/ifcopenshell-python/test/api/drawing/test_assign_product.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.drawing
+import test.bootstrap
class TestAssignProduct(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/drawing/test_edit_text_literal.py b/src/ifcopenshell-python/test/api/drawing/test_edit_text_literal.py
index 410c11ce7a..dcc7ba3dd5 100644
--- a/src/ifcopenshell-python/test/api/drawing/test_edit_text_literal.py
+++ b/src/ifcopenshell-python/test/api/drawing/test_edit_text_literal.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.drawing
+import test.bootstrap
class TestEditTextLiteral(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/drawing/test_unassign_product.py b/src/ifcopenshell-python/test/api/drawing/test_unassign_product.py
index f80a9b2ecc..381b9c01e7 100644
--- a/src/ifcopenshell-python/test/api/drawing/test_unassign_product.py
+++ b/src/ifcopenshell-python/test/api/drawing/test_unassign_product.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.drawing
+import test.bootstrap
class TestUnassignProduct(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/feature/test_add_feature.py b/src/ifcopenshell-python/test/api/feature/test_add_feature.py
index 7ac05f6ecf..eb4f0e3565 100644
--- a/src/ifcopenshell-python/test/api/feature/test_add_feature.py
+++ b/src/ifcopenshell-python/test/api/feature/test_add_feature.py
@@ -17,12 +17,13 @@
# along with IfcOpenShell. If not, see .
import numpy
-import test.bootstrap
+
import ifcopenshell.api.feature
+import ifcopenshell.api.geometry
import ifcopenshell.api.root
import ifcopenshell.api.unit
-import ifcopenshell.api.geometry
import ifcopenshell.util.placement
+import test.bootstrap
class TestAddFeature(test.bootstrap.IFC4X3):
diff --git a/src/ifcopenshell-python/test/api/feature/test_add_filling.py b/src/ifcopenshell-python/test/api/feature/test_add_filling.py
index 49259d75ab..c968215187 100644
--- a/src/ifcopenshell-python/test/api/feature/test_add_filling.py
+++ b/src/ifcopenshell-python/test/api/feature/test_add_filling.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.feature
import ifcopenshell.api.root
+import test.bootstrap
class TestAddFilling(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/feature/test_remove_feature.py b/src/ifcopenshell-python/test/api/feature/test_remove_feature.py
index 5275639525..74065267da 100644
--- a/src/ifcopenshell-python/test/api/feature/test_remove_feature.py
+++ b/src/ifcopenshell-python/test/api/feature/test_remove_feature.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.feature
import ifcopenshell.api.root
+import test.bootstrap
class TestRemoveFeature(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_add_boolean.py b/src/ifcopenshell-python/test/api/geometry/test_add_boolean.py
index 80673275f8..d507f89308 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_add_boolean.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_add_boolean.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.geometry
+import ifcopenshell.api.root
import ifcopenshell.util.shape_builder
+import test.bootstrap
class TestAddBoolean(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_add_profile_representation.py b/src/ifcopenshell-python/test/api/geometry/test_add_profile_representation.py
index 39ac9aa928..e0c500a8cf 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_add_profile_representation.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_add_profile_representation.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.unit
-import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.geometry
+import ifcopenshell.api.root
+import ifcopenshell.api.unit
+import test.bootstrap
from ifcopenshell.util.shape_builder import ShapeBuilder
diff --git a/src/ifcopenshell-python/test/api/geometry/test_add_shape_aspect.py b/src/ifcopenshell-python/test/api/geometry/test_add_shape_aspect.py
index c827f1e33a..b0e9b63f48 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_add_shape_aspect.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_add_shape_aspect.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.geometry
+import ifcopenshell.api.root
import ifcopenshell.util.shape_builder
+import test.bootstrap
class TestAddShapeAspect(test.bootstrap.IFC4):
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 c971219157..ec02c7bc27 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_assign_representation.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_assign_representation.py
@@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api
-import ifcopenshell.api.material
-import ifcopenshell.api.type
-import ifcopenshell.api.root
import ifcopenshell.api.geometry
+import ifcopenshell.api.material
+import ifcopenshell.api.root
+import ifcopenshell.api.type
+import test.bootstrap
class TestAssignRepresentation(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_connect_element.py b/src/ifcopenshell-python/test/api/geometry/test_connect_element.py
index 240976463b..9902b7b4df 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_connect_element.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_connect_element.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.geometry
+import ifcopenshell.api.root
+import test.bootstrap
class TestConnectElement(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_connect_path.py b/src/ifcopenshell-python/test/api/geometry/test_connect_path.py
index 634eb1b45e..bda341d2c6 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_connect_path.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_connect_path.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.geometry
+import ifcopenshell.api.root
+import test.bootstrap
class TestConnectPath(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_disconnect_element.py b/src/ifcopenshell-python/test/api/geometry/test_disconnect_element.py
index 4bf8dfbbc8..9fab39cc01 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_disconnect_element.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_disconnect_element.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.geometry
+import ifcopenshell.api.root
+import test.bootstrap
class TestDisconnectElement(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_disconnect_path.py b/src/ifcopenshell-python/test/api/geometry/test_disconnect_path.py
index fdb0c013d8..5a58a8693b 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_disconnect_path.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_disconnect_path.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.geometry
+import ifcopenshell.api.root
+import test.bootstrap
class TestDisconnectPath(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_edit_object_placement.py b/src/ifcopenshell-python/test/api/geometry/test_edit_object_placement.py
index 70dcbf7285..d243d4b738 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_edit_object_placement.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_edit_object_placement.py
@@ -18,16 +18,17 @@
import numpy
import pytest
-import test.bootstrap
-import ifcopenshell.api.feature
-import ifcopenshell.api.root
-import ifcopenshell.api.unit
-import ifcopenshell.api.system
-import ifcopenshell.api.spatial
-import ifcopenshell.api.geometry
+
import ifcopenshell.api.aggregate
+import ifcopenshell.api.feature
+import ifcopenshell.api.geometry
+import ifcopenshell.api.root
+import ifcopenshell.api.spatial
+import ifcopenshell.api.system
+import ifcopenshell.api.unit
import ifcopenshell.guid
import ifcopenshell.util.placement
+import test.bootstrap
class TestEditObjectPlacement(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_remove_boolean.py b/src/ifcopenshell-python/test/api/geometry/test_remove_boolean.py
index 5330d097cc..aeb7728ea6 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_remove_boolean.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_remove_boolean.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.geometry
+import ifcopenshell.api.root
import ifcopenshell.util.shape_builder
+import test.bootstrap
class TestRemoveBoolean(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_remove_representation.py b/src/ifcopenshell-python/test/api/geometry/test_remove_representation.py
index 4363cc8ac8..1c37f8960a 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_remove_representation.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_remove_representation.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.geometry
+import test.bootstrap
class TestRemoveRepresentation(test.bootstrap.IFC4):
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 1e45054369..55fbcaefe9 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_unassign_representation.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_unassign_representation.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.geometry
import ifcopenshell.util.placement
+import test.bootstrap
class TestUnassignRepresentation(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/geometry/test_validate_type.py b/src/ifcopenshell-python/test/api/geometry/test_validate_type.py
index 189f9619a9..7f4a57e995 100644
--- a/src/ifcopenshell-python/test/api/geometry/test_validate_type.py
+++ b/src/ifcopenshell-python/test/api/geometry/test_validate_type.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.geometry
+import ifcopenshell.api.root
import ifcopenshell.util.shape_builder
+import test.bootstrap
class TestValidateType(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/georeference/test_add_georeferencing.py b/src/ifcopenshell-python/test/api/georeference/test_add_georeferencing.py
index 121af8f5a1..68f1ac2597 100644
--- a/src/ifcopenshell-python/test/api/georeference/test_add_georeferencing.py
+++ b/src/ifcopenshell-python/test/api/georeference/test_add_georeferencing.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.georeference
+import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestAddGeoreferencing(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/georeference/test_edit_georeferencing.py b/src/ifcopenshell-python/test/api/georeference/test_edit_georeferencing.py
index 862983fdc5..729eb0559b 100644
--- a/src/ifcopenshell-python/test/api/georeference/test_edit_georeferencing.py
+++ b/src/ifcopenshell-python/test/api/georeference/test_edit_georeferencing.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.georeference
+import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestEditGeoreferencing(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/georeference/test_edit_true_north.py b/src/ifcopenshell-python/test/api/georeference/test_edit_true_north.py
index 9f8f2dd07a..dc8ea2bc3e 100644
--- a/src/ifcopenshell-python/test/api/georeference/test_edit_true_north.py
+++ b/src/ifcopenshell-python/test/api/georeference/test_edit_true_north.py
@@ -17,11 +17,12 @@
# along with IfcOpenShell. If not, see .
import numpy as np
-import test.bootstrap
-import ifcopenshell.api.root
+
import ifcopenshell.api.context
import ifcopenshell.api.georeference
+import ifcopenshell.api.root
import ifcopenshell.util.geolocation
+import test.bootstrap
class TestEditTrueNorth(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/georeference/test_edit_wcs.py b/src/ifcopenshell-python/test/api/georeference/test_edit_wcs.py
index f23ce928ce..9e761e81bb 100644
--- a/src/ifcopenshell-python/test/api/georeference/test_edit_wcs.py
+++ b/src/ifcopenshell-python/test/api/georeference/test_edit_wcs.py
@@ -17,11 +17,12 @@
# along with IfcOpenShell. If not, see .
import numpy as np
-import test.bootstrap
-import ifcopenshell.api.root
+
import ifcopenshell.api.context
import ifcopenshell.api.georeference
+import ifcopenshell.api.root
import ifcopenshell.util.geolocation
+import test.bootstrap
class TestEditWCS(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/georeference/test_remove_georeferencing.py b/src/ifcopenshell-python/test/api/georeference/test_remove_georeferencing.py
index 5befb17b99..13bca27c5d 100644
--- a/src/ifcopenshell-python/test/api/georeference/test_remove_georeferencing.py
+++ b/src/ifcopenshell-python/test/api/georeference/test_remove_georeferencing.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.georeference
+import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestRemoveGeoreferencing(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/grid/test_create_grid_axis.py b/src/ifcopenshell-python/test/api/grid/test_create_grid_axis.py
index 518f6308d2..24ca32f9ef 100644
--- a/src/ifcopenshell-python/test/api/grid/test_create_grid_axis.py
+++ b/src/ifcopenshell-python/test/api/grid/test_create_grid_axis.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.grid
+import test.bootstrap
class TestCreateGridAxis(test.bootstrap.IFC4):
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 0c8af993ab..0c3547ce49 100644
--- a/src/ifcopenshell-python/test/api/group/test_add_group.py
+++ b/src/ifcopenshell-python/test/api/group/test_add_group.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.group
import ifcopenshell.util.element
+import test.bootstrap
class TestAddGroup(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/group/test_assign_group.py b/src/ifcopenshell-python/test/api/group/test_assign_group.py
index 85b2711e27..959883db3b 100644
--- a/src/ifcopenshell-python/test/api/group/test_assign_group.py
+++ b/src/ifcopenshell-python/test/api/group/test_assign_group.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.group
+import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestAssignGroup(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/group/test_remove_group.py b/src/ifcopenshell-python/test/api/group/test_remove_group.py
index 28e59493c5..efe7cd25d3 100644
--- a/src/ifcopenshell-python/test/api/group/test_remove_group.py
+++ b/src/ifcopenshell-python/test/api/group/test_remove_group.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import ifcopenshell.api.group
import ifcopenshell.api.pset
import ifcopenshell.api.root
-import ifcopenshell.api.group
+import test.bootstrap
class TestRemoveGroup(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/group/test_unassign_group.py b/src/ifcopenshell-python/test/api/group/test_unassign_group.py
index c40b4affcb..f909e428f7 100644
--- a/src/ifcopenshell-python/test/api/group/test_unassign_group.py
+++ b/src/ifcopenshell-python/test/api/group/test_unassign_group.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.group
+import ifcopenshell.api.root
+import test.bootstrap
class TestAssignGroup(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/group/test_update_group_products.py b/src/ifcopenshell-python/test/api/group/test_update_group_products.py
index 56d685de9a..c8e50f7d0e 100644
--- a/src/ifcopenshell-python/test/api/group/test_update_group_products.py
+++ b/src/ifcopenshell-python/test/api/group/test_update_group_products.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.group
+import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestUpdateGroupProductsIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/layer/test_add_layer.py b/src/ifcopenshell-python/test/api/layer/test_add_layer.py
index 97635ccb63..aa54065048 100644
--- a/src/ifcopenshell-python/test/api/layer/test_add_layer.py
+++ b/src/ifcopenshell-python/test/api/layer/test_add_layer.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.layer
+import test.bootstrap
class TestAddLayer(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/layer/test_add_layer_with_style.py b/src/ifcopenshell-python/test/api/layer/test_add_layer_with_style.py
index 0395e40178..8d52258727 100644
--- a/src/ifcopenshell-python/test/api/layer/test_add_layer_with_style.py
+++ b/src/ifcopenshell-python/test/api/layer/test_add_layer_with_style.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.layer
+import test.bootstrap
class TestAddLayerWithStyle(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/layer/test_assign_layer.py b/src/ifcopenshell-python/test/api/layer/test_assign_layer.py
index f2b0e831d9..9c174975ca 100644
--- a/src/ifcopenshell-python/test/api/layer/test_assign_layer.py
+++ b/src/ifcopenshell-python/test/api/layer/test_assign_layer.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.layer
+import test.bootstrap
class TestAssignLayer(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/layer/test_unassign_layer.py b/src/ifcopenshell-python/test/api/layer/test_unassign_layer.py
index 018c9125f5..8d14f6ad94 100644
--- a/src/ifcopenshell-python/test/api/layer/test_unassign_layer.py
+++ b/src/ifcopenshell-python/test/api/layer/test_unassign_layer.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.layer
+import test.bootstrap
class TestUnassignLayer(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/library/test_add_library.py b/src/ifcopenshell-python/test/api/library/test_add_library.py
index e2cd440028..36b63b70f6 100644
--- a/src/ifcopenshell-python/test/api/library/test_add_library.py
+++ b/src/ifcopenshell-python/test/api/library/test_add_library.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.library
+import test.bootstrap
class TestAddLibrary(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/library/test_add_reference.py b/src/ifcopenshell-python/test/api/library/test_add_reference.py
index 95f23d495f..596d878b67 100644
--- a/src/ifcopenshell-python/test/api/library/test_add_reference.py
+++ b/src/ifcopenshell-python/test/api/library/test_add_reference.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.library
+import test.bootstrap
class TestAddReference(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/library/test_assign_reference.py b/src/ifcopenshell-python/test/api/library/test_assign_reference.py
index 988d4c2265..822687f2db 100644
--- a/src/ifcopenshell-python/test/api/library/test_assign_reference.py
+++ b/src/ifcopenshell-python/test/api/library/test_assign_reference.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.library
+import test.bootstrap
class TestAssignReference(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/library/test_edit_library.py b/src/ifcopenshell-python/test/api/library/test_edit_library.py
index 26f46d3016..42f4119f99 100644
--- a/src/ifcopenshell-python/test/api/library/test_edit_library.py
+++ b/src/ifcopenshell-python/test/api/library/test_edit_library.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import datetime
+
import ifcopenshell.api.library
import ifcopenshell.util.date
+import test.bootstrap
class TestEditLibrary(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/library/test_edit_reference.py b/src/ifcopenshell-python/test/api/library/test_edit_reference.py
index b979a56357..6bb638ff5b 100644
--- a/src/ifcopenshell-python/test/api/library/test_edit_reference.py
+++ b/src/ifcopenshell-python/test/api/library/test_edit_reference.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.library
+import test.bootstrap
class TestEditReference(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/library/test_remove_library.py b/src/ifcopenshell-python/test/api/library/test_remove_library.py
index 7376d4a288..038249f49b 100644
--- a/src/ifcopenshell-python/test/api/library/test_remove_library.py
+++ b/src/ifcopenshell-python/test/api/library/test_remove_library.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.library
+import test.bootstrap
class TestRemoveLibrary(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/library/test_remove_reference.py b/src/ifcopenshell-python/test/api/library/test_remove_reference.py
index f6f6d90588..32b0920188 100644
--- a/src/ifcopenshell-python/test/api/library/test_remove_reference.py
+++ b/src/ifcopenshell-python/test/api/library/test_remove_reference.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.library
+import test.bootstrap
class TestRemoveReference(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/library/test_unassign_reference.py b/src/ifcopenshell-python/test/api/library/test_unassign_reference.py
index e7e1b9cf63..e1223b91fe 100644
--- a/src/ifcopenshell-python/test/api/library/test_unassign_reference.py
+++ b/src/ifcopenshell-python/test/api/library/test_unassign_reference.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.library
import ifcopenshell.util.element
+import test.bootstrap
class TestUnassignReference(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/material/test_add_material_set.py b/src/ifcopenshell-python/test/api/material/test_add_material_set.py
index 758c40b824..10e65cb6d3 100644
--- a/src/ifcopenshell-python/test/api/material/test_add_material_set.py
+++ b/src/ifcopenshell-python/test/api/material/test_add_material_set.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.material
+import test.bootstrap
class TestAddMaterialSetIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/material/test_assign_material.py b/src/ifcopenshell-python/test/api/material/test_assign_material.py
index 2baeedcb50..554bc95b9f 100644
--- a/src/ifcopenshell-python/test/api/material/test_assign_material.py
+++ b/src/ifcopenshell-python/test/api/material/test_assign_material.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import ifcopenshell.api.material
import ifcopenshell.api.root
import ifcopenshell.api.type
-import ifcopenshell.api.material
import ifcopenshell.util.element
+import test.bootstrap
class TestAssignMaterialIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/material/test_copy_material.py b/src/ifcopenshell-python/test/api/material/test_copy_material.py
index 2faa210e6c..51e36f0eac 100644
--- a/src/ifcopenshell-python/test/api/material/test_copy_material.py
+++ b/src/ifcopenshell-python/test/api/material/test_copy_material.py
@@ -16,13 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import ifcopenshell.api.context
+import ifcopenshell.api.material
import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.api.style
-import ifcopenshell.api.context
-import ifcopenshell.api.material
import ifcopenshell.util.element
+import test.bootstrap
class TestCopyMaterial(test.bootstrap.IFC4):
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 3a029482c1..478c41eb55 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
@@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
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/material/test_remove_material.py b/src/ifcopenshell-python/test/api/material/test_remove_material.py
index 01f3621a81..d33f9114dc 100644
--- a/src/ifcopenshell-python/test/api/material/test_remove_material.py
+++ b/src/ifcopenshell-python/test/api/material/test_remove_material.py
@@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import ifcopenshell.api.context
+import ifcopenshell.api.material
import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.api.style
-import ifcopenshell.api.context
-import ifcopenshell.api.material
+import test.bootstrap
class TestRemoveMaterialIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/material/test_remove_material_set.py b/src/ifcopenshell-python/test/api/material/test_remove_material_set.py
index 3c6c70b44a..24330c3720 100644
--- a/src/ifcopenshell-python/test/api/material/test_remove_material_set.py
+++ b/src/ifcopenshell-python/test/api/material/test_remove_material_set.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.material
import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.api.type
+import test.bootstrap
class TestRemoveMaterialSetIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/material/test_unassign_material.py b/src/ifcopenshell-python/test/api/material/test_unassign_material.py
index 398661c7b0..ba5f29c04a 100644
--- a/src/ifcopenshell-python/test/api/material/test_unassign_material.py
+++ b/src/ifcopenshell-python/test/api/material/test_unassign_material.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import ifcopenshell.api.material
import ifcopenshell.api.root
import ifcopenshell.api.type
-import ifcopenshell.api.material
import ifcopenshell.util.element
+import test.bootstrap
class TestUnassignMaterialIFC2X3(test.bootstrap.IFC2X3):
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 a6abfde611..45c4d828e3 100644
--- a/src/ifcopenshell-python/test/api/nest/test_assign_object.py
+++ b/src/ifcopenshell-python/test/api/nest/test_assign_object.py
@@ -17,11 +17,12 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api.nest
import ifcopenshell.api.root
import ifcopenshell.util.element
import ifcopenshell.util.placement
+import test.bootstrap
class TestAssignObject(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/nest/test_unassign_object.py b/src/ifcopenshell-python/test/api/nest/test_unassign_object.py
index 9f3979b85d..925d15b2db 100644
--- a/src/ifcopenshell-python/test/api/nest/test_unassign_object.py
+++ b/src/ifcopenshell-python/test/api/nest/test_unassign_object.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.nest
import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestUnassignObject(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_add_actor.py b/src/ifcopenshell-python/test/api/owner/test_add_actor.py
index 2a4bf52cf7..c3a8410ae6 100644
--- a/src/ifcopenshell-python/test/api/owner/test_add_actor.py
+++ b/src/ifcopenshell-python/test/api/owner/test_add_actor.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestAddActor(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_add_address.py b/src/ifcopenshell-python/test/api/owner/test_add_address.py
index 16dc75f492..ffb3daebf2 100644
--- a/src/ifcopenshell-python/test/api/owner/test_add_address.py
+++ b/src/ifcopenshell-python/test/api/owner/test_add_address.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestAddAddress(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_add_application.py b/src/ifcopenshell-python/test/api/owner/test_add_application.py
index 77890c19cf..bc70fae55a 100644
--- a/src/ifcopenshell-python/test/api/owner/test_add_application.py
+++ b/src/ifcopenshell-python/test/api/owner/test_add_application.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
import ifcopenshell.util.element
+import test.bootstrap
class TestAddApplication(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_add_organisation.py b/src/ifcopenshell-python/test/api/owner/test_add_organisation.py
index 5f20a35129..5080951e57 100644
--- a/src/ifcopenshell-python/test/api/owner/test_add_organisation.py
+++ b/src/ifcopenshell-python/test/api/owner/test_add_organisation.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestAddOrganisation(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_add_person.py b/src/ifcopenshell-python/test/api/owner/test_add_person.py
index 9f1dc8e776..8d02a45d0a 100644
--- a/src/ifcopenshell-python/test/api/owner/test_add_person.py
+++ b/src/ifcopenshell-python/test/api/owner/test_add_person.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestAddPerson(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_add_person_and_organisation.py b/src/ifcopenshell-python/test/api/owner/test_add_person_and_organisation.py
index ac97b7a317..7ed6cf8934 100644
--- a/src/ifcopenshell-python/test/api/owner/test_add_person_and_organisation.py
+++ b/src/ifcopenshell-python/test/api/owner/test_add_person_and_organisation.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestAddPersonAndOrganisation(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_add_role.py b/src/ifcopenshell-python/test/api/owner/test_add_role.py
index c98cba08e9..05c450aa2f 100644
--- a/src/ifcopenshell-python/test/api/owner/test_add_role.py
+++ b/src/ifcopenshell-python/test/api/owner/test_add_role.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestAddRole(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_assign_actor.py b/src/ifcopenshell-python/test/api/owner/test_assign_actor.py
index c4c6f84c24..0098037f39 100644
--- a/src/ifcopenshell-python/test/api/owner/test_assign_actor.py
+++ b/src/ifcopenshell-python/test/api/owner/test_assign_actor.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestAssignActor(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_create_owner_history.py b/src/ifcopenshell-python/test/api/owner/test_create_owner_history.py
index 839f46ea73..5d717fed80 100644
--- a/src/ifcopenshell-python/test/api/owner/test_create_owner_history.py
+++ b/src/ifcopenshell-python/test/api/owner/test_create_owner_history.py
@@ -17,10 +17,12 @@
# along with IfcOpenShell. If not, see .
import time
+
import pytest
-import test.bootstrap
+
import ifcopenshell.api
import ifcopenshell.api.owner.settings
+import test.bootstrap
class TestCreateOwnerHistory(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_edit_actor.py b/src/ifcopenshell-python/test/api/owner/test_edit_actor.py
index 02335cca41..f050514819 100644
--- a/src/ifcopenshell-python/test/api/owner/test_edit_actor.py
+++ b/src/ifcopenshell-python/test/api/owner/test_edit_actor.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestEditActor(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_edit_address.py b/src/ifcopenshell-python/test/api/owner/test_edit_address.py
index c01b072939..1529f1b863 100644
--- a/src/ifcopenshell-python/test/api/owner/test_edit_address.py
+++ b/src/ifcopenshell-python/test/api/owner/test_edit_address.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestEditAddress(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_edit_application.py b/src/ifcopenshell-python/test/api/owner/test_edit_application.py
index 4a88e8631b..ac3612bca9 100644
--- a/src/ifcopenshell-python/test/api/owner/test_edit_application.py
+++ b/src/ifcopenshell-python/test/api/owner/test_edit_application.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestEditApplication(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_edit_organisation.py b/src/ifcopenshell-python/test/api/owner/test_edit_organisation.py
index c1a6742239..6580762406 100644
--- a/src/ifcopenshell-python/test/api/owner/test_edit_organisation.py
+++ b/src/ifcopenshell-python/test/api/owner/test_edit_organisation.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestEditOrganisation(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_edit_person.py b/src/ifcopenshell-python/test/api/owner/test_edit_person.py
index e1b79ddc6e..ae07f78e91 100644
--- a/src/ifcopenshell-python/test/api/owner/test_edit_person.py
+++ b/src/ifcopenshell-python/test/api/owner/test_edit_person.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestEditPerson(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_edit_role.py b/src/ifcopenshell-python/test/api/owner/test_edit_role.py
index c92f38d15c..8fb203cbf1 100644
--- a/src/ifcopenshell-python/test/api/owner/test_edit_role.py
+++ b/src/ifcopenshell-python/test/api/owner/test_edit_role.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestEditRole(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_remove_actor.py b/src/ifcopenshell-python/test/api/owner/test_remove_actor.py
index f46b70ca6e..db044c3efe 100644
--- a/src/ifcopenshell-python/test/api/owner/test_remove_actor.py
+++ b/src/ifcopenshell-python/test/api/owner/test_remove_actor.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestRemoveActor(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_remove_address.py b/src/ifcopenshell-python/test/api/owner/test_remove_address.py
index f8d6c6094f..e8dfb72dc0 100644
--- a/src/ifcopenshell-python/test/api/owner/test_remove_address.py
+++ b/src/ifcopenshell-python/test/api/owner/test_remove_address.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestRemoveAddress(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_remove_organisation.py b/src/ifcopenshell-python/test/api/owner/test_remove_organisation.py
index 7da306ecf3..0a0f25dd73 100644
--- a/src/ifcopenshell-python/test/api/owner/test_remove_organisation.py
+++ b/src/ifcopenshell-python/test/api/owner/test_remove_organisation.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
import ifcopenshell.guid
+import test.bootstrap
class TestRemoveOrganisationIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/owner/test_remove_person.py b/src/ifcopenshell-python/test/api/owner/test_remove_person.py
index 8304d4b985..d8effdd4ec 100644
--- a/src/ifcopenshell-python/test/api/owner/test_remove_person.py
+++ b/src/ifcopenshell-python/test/api/owner/test_remove_person.py
@@ -17,9 +17,10 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api.owner
import ifcopenshell.guid
+import test.bootstrap
class TestRemovePersonIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/owner/test_remove_person_and_organisation.py b/src/ifcopenshell-python/test/api/owner/test_remove_person_and_organisation.py
index a07d8dbe6a..a8bfa3a891 100644
--- a/src/ifcopenshell-python/test/api/owner/test_remove_person_and_organisation.py
+++ b/src/ifcopenshell-python/test/api/owner/test_remove_person_and_organisation.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
import ifcopenshell.guid
+import test.bootstrap
class TestRemovePersonAndOrganisationIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/owner/test_remove_role.py b/src/ifcopenshell-python/test/api/owner/test_remove_role.py
index 0c2afcdd99..3ef261be00 100644
--- a/src/ifcopenshell-python/test/api/owner/test_remove_role.py
+++ b/src/ifcopenshell-python/test/api/owner/test_remove_role.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestRemoveRoleIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/owner/test_unassign_actor.py b/src/ifcopenshell-python/test/api/owner/test_unassign_actor.py
index 96a21c1a79..465ca01bae 100644
--- a/src/ifcopenshell-python/test/api/owner/test_unassign_actor.py
+++ b/src/ifcopenshell-python/test/api/owner/test_unassign_actor.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.owner
+import test.bootstrap
class TestUnassignActor(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/owner/test_update_owner_history.py b/src/ifcopenshell-python/test/api/owner/test_update_owner_history.py
index fb500658e1..1aeb5ad7c3 100644
--- a/src/ifcopenshell-python/test/api/owner/test_update_owner_history.py
+++ b/src/ifcopenshell-python/test/api/owner/test_update_owner_history.py
@@ -17,9 +17,10 @@
# along with IfcOpenShell. If not, see .
import time
-import test.bootstrap
+
import ifcopenshell.api.owner
import ifcopenshell.api.owner.settings
+import test.bootstrap
class TestUpdateOwnerHistory(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/profile/test_add_parameterized_profile.py b/src/ifcopenshell-python/test/api/profile/test_add_parameterized_profile.py
index 8481592643..b485cc97e7 100644
--- a/src/ifcopenshell-python/test/api/profile/test_add_parameterized_profile.py
+++ b/src/ifcopenshell-python/test/api/profile/test_add_parameterized_profile.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.profile
import ifcopenshell.util.schema
+import test.bootstrap
class TestAddParametrizedProfileIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/profile/test_copy_profile.py b/src/ifcopenshell-python/test/api/profile/test_copy_profile.py
index 8cc19b1489..b82c47c12b 100644
--- a/src/ifcopenshell-python/test/api/profile/test_copy_profile.py
+++ b/src/ifcopenshell-python/test/api/profile/test_copy_profile.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.profile
import ifcopenshell.api.pset
import ifcopenshell.util.element
+import test.bootstrap
class TestCopyProfileIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/profile/test_remove_profile.py b/src/ifcopenshell-python/test/api/profile/test_remove_profile.py
index 86b3e136e7..3657ebc2d2 100644
--- a/src/ifcopenshell-python/test/api/profile/test_remove_profile.py
+++ b/src/ifcopenshell-python/test/api/profile/test_remove_profile.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.profile
import ifcopenshell.api.pset
+import test.bootstrap
class TestRemoveProfileIFC2X3(test.bootstrap.IFC2X3):
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 399ee1fd04..f89e4d5c89 100644
--- a/src/ifcopenshell-python/test/api/project/test_append_asset.py
+++ b/src/ifcopenshell-python/test/api/project/test_append_asset.py
@@ -16,28 +16,29 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.layer
-import ifcopenshell.api.geometry
-import ifcopenshell.api.georeference
-import ifcopenshell.api.pset
-import ifcopenshell.api.root
-import ifcopenshell.api.type
+import numpy as np
+
+import ifcopenshell.api.classification
+import ifcopenshell.api.context
import ifcopenshell.api.cost
import ifcopenshell.api.feature
-import ifcopenshell.api.style
-import ifcopenshell.api.context
-import ifcopenshell.api.project
+import ifcopenshell.api.geometry
+import ifcopenshell.api.georeference
+import ifcopenshell.api.layer
import ifcopenshell.api.material
-import ifcopenshell.api.profile
-import ifcopenshell.api.unit
-import ifcopenshell.api.classification
import ifcopenshell.api.owner.settings
-import ifcopenshell.util.element
+import ifcopenshell.api.profile
+import ifcopenshell.api.project
+import ifcopenshell.api.pset
+import ifcopenshell.api.root
+import ifcopenshell.api.style
+import ifcopenshell.api.type
+import ifcopenshell.api.unit
import ifcopenshell.util.classification
+import ifcopenshell.util.element
import ifcopenshell.util.placement
import ifcopenshell.util.unit
-import numpy as np
+import test.bootstrap
from ifcopenshell.util.shape_builder import ShapeBuilder
diff --git a/src/ifcopenshell-python/test/api/project/test_assign_declaration.py b/src/ifcopenshell-python/test/api/project/test_assign_declaration.py
index 8bbaf521cc..af24565b59 100644
--- a/src/ifcopenshell-python/test/api/project/test_assign_declaration.py
+++ b/src/ifcopenshell-python/test/api/project/test_assign_declaration.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.project
+import ifcopenshell.api.root
+import test.bootstrap
# NOTE: supported only in IFC4+
diff --git a/src/ifcopenshell-python/test/api/project/test_create_file.py b/src/ifcopenshell-python/test/api/project/test_create_file.py
index 8456e2fe27..6373968cb2 100644
--- a/src/ifcopenshell-python/test/api/project/test_create_file.py
+++ b/src/ifcopenshell-python/test/api/project/test_create_file.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.project
+import test.bootstrap
class TestCreateFile(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/project/test_unassign_declaration.py b/src/ifcopenshell-python/test/api/project/test_unassign_declaration.py
index 6a1683840b..4d77f2b721 100644
--- a/src/ifcopenshell-python/test/api/project/test_unassign_declaration.py
+++ b/src/ifcopenshell-python/test/api/project/test_unassign_declaration.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
-import ifcopenshell.api.project
from typing import Union
+import ifcopenshell.api.project
+import ifcopenshell.api.root
+import test.bootstrap
+
# NOTE: supported only in IFC4+
class TestUnassignDeclaration(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/pset/test_add_pset.py b/src/ifcopenshell-python/test/api/pset/test_add_pset.py
index fadb1a369c..1629c639bf 100644
--- a/src/ifcopenshell-python/test/api/pset/test_add_pset.py
+++ b/src/ifcopenshell-python/test/api/pset/test_add_pset.py
@@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import ifcopenshell.api.material
+import ifcopenshell.api.profile
import ifcopenshell.api.pset
import ifcopenshell.api.root
-import ifcopenshell.api.profile
-import ifcopenshell.api.material
import ifcopenshell.util.element
+import test.bootstrap
class TestAddPset(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/pset/test_add_qto.py b/src/ifcopenshell-python/test/api/pset/test_add_qto.py
index 4c7493ca14..3f4a4e3ce6 100644
--- a/src/ifcopenshell-python/test/api/pset/test_add_qto.py
+++ b/src/ifcopenshell-python/test/api/pset/test_add_qto.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestAddQto(test.bootstrap.IFC4):
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 950d2743cb..e1234e8fe1 100644
--- a/src/ifcopenshell-python/test/api/pset/test_assign_pset.py
+++ b/src/ifcopenshell-python/test/api/pset/test_assign_pset.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.pset
import ifcopenshell.util.element
+import test.bootstrap
class TestAssignPset(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/pset/test_edit_pset.py b/src/ifcopenshell-python/test/api/pset/test_edit_pset.py
index 257297f6b9..84347c626f 100644
--- a/src/ifcopenshell-python/test/api/pset/test_edit_pset.py
+++ b/src/ifcopenshell-python/test/api/pset/test_edit_pset.py
@@ -17,12 +17,13 @@
# along with IfcOpenShell. If not, see .
import operator
-import test.bootstrap
+from typing import Union
+
import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.guid
import ifcopenshell.util.element
-from typing import Union
+import test.bootstrap
def get_properties(material: ifcopenshell.entity_instance) -> Union[ifcopenshell.entity_instance, None]:
diff --git a/src/ifcopenshell-python/test/api/pset/test_edit_qto.py b/src/ifcopenshell-python/test/api/pset/test_edit_qto.py
index 0dc2bb5ef7..5bf31f8262 100644
--- a/src/ifcopenshell-python/test/api/pset/test_edit_qto.py
+++ b/src/ifcopenshell-python/test/api/pset/test_edit_qto.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.pset
import ifcopenshell.api.root
+import test.bootstrap
class TestEditQto(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/pset/test_remove_pset.py b/src/ifcopenshell-python/test/api/pset/test_remove_pset.py
index bb154cfc4f..b0f5dfd004 100644
--- a/src/ifcopenshell-python/test/api/pset/test_remove_pset.py
+++ b/src/ifcopenshell-python/test/api/pset/test_remove_pset.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.util.element
+import test.bootstrap
class TestRemovePset(test.bootstrap.IFC4):
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 585a281713..58c476d74a 100644
--- a/src/ifcopenshell-python/test/api/pset/test_unassign_pset.py
+++ b/src/ifcopenshell-python/test/api/pset/test_unassign_pset.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.pset
import ifcopenshell.util.element
+import test.bootstrap
class TestUnassignPset(test.bootstrap.IFC4):
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 846d2d5a54..769294e1b5 100644
--- a/src/ifcopenshell-python/test/api/pset/test_unshare_pset.py
+++ b/src/ifcopenshell-python/test/api/pset/test_unshare_pset.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.pset
import ifcopenshell.api.root
-import ifcopenshell.util.element
import ifcopenshell.guid
+import ifcopenshell.util.element
+import test.bootstrap
class TestUnsharePset(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/pset_template/test_edit_prop_template.py b/src/ifcopenshell-python/test/api/pset_template/test_edit_prop_template.py
index ac076964c7..5f26b02983 100644
--- a/src/ifcopenshell-python/test/api/pset_template/test_edit_prop_template.py
+++ b/src/ifcopenshell-python/test/api/pset_template/test_edit_prop_template.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.pset_template
+import test.bootstrap
class TestEditPropTemplate(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/resource/test_add_resource_quantity.py b/src/ifcopenshell-python/test/api/resource/test_add_resource_quantity.py
index c9e20e7a49..890f290bc6 100644
--- a/src/ifcopenshell-python/test/api/resource/test_add_resource_quantity.py
+++ b/src/ifcopenshell-python/test/api/resource/test_add_resource_quantity.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api
import ifcopenshell.api.resource
import ifcopenshell.util.resource
+import test.bootstrap
class TestAddResourceQuantity(test.bootstrap.IFC4):
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 c80e3dae28..6affa8a60f 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
@@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.pset
-import ifcopenshell.api.root
import ifcopenshell.api.resource
+import ifcopenshell.api.root
import ifcopenshell.api.sequence
import ifcopenshell.util.constraint
+import test.bootstrap
# NOTE: resource module features relies on entities introduced in IFC4
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 66ba27ec06..77de023379 100644
--- a/src/ifcopenshell-python/test/api/root/test_copy_class.py
+++ b/src/ifcopenshell-python/test/api/root/test_copy_class.py
@@ -17,19 +17,20 @@
# along with IfcOpenShell. If not, see .
import numpy
-import test.bootstrap
-import ifcopenshell.api.unit
-import ifcopenshell.api.type
-import ifcopenshell.api.root
-import ifcopenshell.api.feature
-import ifcopenshell.api.pset
-import ifcopenshell.api.group
-import ifcopenshell.api.system
-import ifcopenshell.api.spatial
-import ifcopenshell.api.geometry
+
import ifcopenshell.api.aggregate
+import ifcopenshell.api.feature
+import ifcopenshell.api.geometry
+import ifcopenshell.api.group
+import ifcopenshell.api.pset
+import ifcopenshell.api.root
+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
class TestCopyClass(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/root/test_create_entity.py b/src/ifcopenshell-python/test/api/root/test_create_entity.py
index dbe27a3a51..9616b2fec1 100644
--- a/src/ifcopenshell-python/test/api/root/test_create_entity.py
+++ b/src/ifcopenshell-python/test/api/root/test_create_entity.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.root
+import test.bootstrap
class TestCreateEntity(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/root/test_reassign_class.py b/src/ifcopenshell-python/test/api/root/test_reassign_class.py
index f8be13225e..bd6d0f05e8 100644
--- a/src/ifcopenshell-python/test/api/root/test_reassign_class.py
+++ b/src/ifcopenshell-python/test/api/root/test_reassign_class.py
@@ -18,13 +18,13 @@
import ifcopenshell.api.aggregate
import ifcopenshell.api.geometry
-import ifcopenshell.api.spatial
-import ifcopenshell.util.representation
-import test.bootstrap
import ifcopenshell.api.pset
import ifcopenshell.api.root
+import ifcopenshell.api.spatial
import ifcopenshell.api.type
import ifcopenshell.util.element
+import ifcopenshell.util.representation
+import test.bootstrap
class TestReassignClass(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/root/test_remove_product.py b/src/ifcopenshell-python/test/api/root/test_remove_product.py
index da9b46dbe5..ae2308b360 100644
--- a/src/ifcopenshell-python/test/api/root/test_remove_product.py
+++ b/src/ifcopenshell-python/test/api/root/test_remove_product.py
@@ -16,24 +16,24 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.unit
-import ifcopenshell.api.nest
-import ifcopenshell.api.root
-import ifcopenshell.api.feature
-import ifcopenshell.api.grid
-import ifcopenshell.api.type
-import ifcopenshell.api.pset
-import ifcopenshell.api.group
-import ifcopenshell.api.owner
-import ifcopenshell.api.system
-import ifcopenshell.api.spatial
-import ifcopenshell.api.drawing
-import ifcopenshell.api.context
-import ifcopenshell.api.geometry
-import ifcopenshell.api.material
import ifcopenshell.api.aggregate
+import ifcopenshell.api.context
+import ifcopenshell.api.drawing
+import ifcopenshell.api.feature
+import ifcopenshell.api.geometry
+import ifcopenshell.api.grid
+import ifcopenshell.api.group
+import ifcopenshell.api.material
+import ifcopenshell.api.nest
+import ifcopenshell.api.owner
+import ifcopenshell.api.pset
+import ifcopenshell.api.root
+import ifcopenshell.api.spatial
+import ifcopenshell.api.system
+import ifcopenshell.api.type
+import ifcopenshell.api.unit
import ifcopenshell.guid
+import test.bootstrap
class TestRemoveProduct(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/sequence/test_add_date_time.py b/src/ifcopenshell-python/test/api/sequence/test_add_date_time.py
index 3b5d5ac15c..742a7d54ec 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_add_date_time.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_add_date_time.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from datetime import datetime
+
+import ifcopenshell.api.sequence
import ifcopenshell.util
import ifcopenshell.util.date
import test.bootstrap
-import ifcopenshell.api.sequence
-from datetime import datetime
class TestAddDateTime(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/sequence/test_assign_product.py b/src/ifcopenshell-python/test/api/sequence/test_assign_product.py
index 19812e820c..b78b4d65a8 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_assign_product.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_assign_product.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.sequence
+import test.bootstrap
class TestAssignProduct(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/sequence/test_calculate_task_duration.py b/src/ifcopenshell-python/test/api/sequence/test_calculate_task_duration.py
index daed2ecb64..462526966a 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_calculate_task_duration.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_calculate_task_duration.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.pset
-import ifcopenshell.api.sequence
import ifcopenshell.api.resource
+import ifcopenshell.api.root
+import ifcopenshell.api.sequence
+import test.bootstrap
# NOTE: sequence module features relies on entities introduced in IFC4
diff --git a/src/ifcopenshell-python/test/api/sequence/test_cascade_schedule.py b/src/ifcopenshell-python/test/api/sequence/test_cascade_schedule.py
index 87d5647343..32c9908736 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_cascade_schedule.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_cascade_schedule.py
@@ -16,10 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import pytest
import datetime
-import test.bootstrap
+
+import pytest
+
import ifcopenshell.api.sequence
+import test.bootstrap
# NOTE: sequence module features relies on entities introduced in IFC4
diff --git a/src/ifcopenshell-python/test/api/sequence/test_edit_task_time.py b/src/ifcopenshell-python/test/api/sequence/test_edit_task_time.py
index dcaf082bf8..a28a6cd604 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_edit_task_time.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_edit_task_time.py
@@ -17,11 +17,11 @@
# along with IfcOpenShell. If not, see .
import datetime
-import test.bootstrap
-import ifcopenshell.api.root
-import ifcopenshell.api.control
-import ifcopenshell.api.sequence
+import ifcopenshell.api.control
+import ifcopenshell.api.root
+import ifcopenshell.api.sequence
+import test.bootstrap
# NOTE: IfcTaskTime was introduced in IFC4
diff --git a/src/ifcopenshell-python/test/api/sequence/test_edit_work_time.py b/src/ifcopenshell-python/test/api/sequence/test_edit_work_time.py
index dc58088d38..8ca467b681 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_edit_work_time.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_edit_work_time.py
@@ -17,8 +17,9 @@
# along with IfcOpenShell. If not, see .
import datetime
-import test.bootstrap
+
import ifcopenshell.api.sequence
+import test.bootstrap
# NOTE: IfcWorkTime was introduced in IFC4
diff --git a/src/ifcopenshell-python/test/api/sequence/test_recalculate_schedule.py b/src/ifcopenshell-python/test/api/sequence/test_recalculate_schedule.py
index d5aacde632..0445f16474 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_recalculate_schedule.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_recalculate_schedule.py
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import pytest
import datetime
-import test.bootstrap
+
+import pytest
+
import ifcopenshell.api.root
import ifcopenshell.api.sequence
+import test.bootstrap
# NOTE: sequence module features relies on entities introduced in IFC4
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 a23cf9cb54..1d1d3c1467 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_remove_task.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_remove_task.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api
import ifcopenshell.api.nest
import ifcopenshell.api.sequence
+import test.bootstrap
# NOTE: sequence module features relies on entities introduced in IFC4
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 99b0a035dc..42264d1182 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
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api
import ifcopenshell.api.control
import ifcopenshell.api.sequence
+import test.bootstrap
# NOTE: sequence module features relies on entities introduced in IFC4
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 273577f63e..6f9a0ee9cf 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
@@ -17,9 +17,10 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api
import ifcopenshell.api.sequence
+import test.bootstrap
def declared_objects(ifc_file: ifcopenshell.file) -> set[ifcopenshell.entity_instance]:
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 b661b8df48..ea2b094364 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
@@ -17,9 +17,10 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api
import ifcopenshell.api.sequence
+import test.bootstrap
def declared_objects(ifc_file: ifcopenshell.file) -> set[ifcopenshell.entity_instance]:
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 d0318c5c7a..30393c540b 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
@@ -17,9 +17,10 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api
import ifcopenshell.api.sequence
+import test.bootstrap
# NOTE: sequence module features relies on entities introduced in IFC4
diff --git a/src/ifcopenshell-python/test/api/sequence/test_unassign_product.py b/src/ifcopenshell-python/test/api/sequence/test_unassign_product.py
index fdeae7e25d..537b2c6043 100644
--- a/src/ifcopenshell-python/test/api/sequence/test_unassign_product.py
+++ b/src/ifcopenshell-python/test/api/sequence/test_unassign_product.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.sequence
+import test.bootstrap
class TestUnassignProduct(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/spatial/test_assign_container.py b/src/ifcopenshell-python/test/api/spatial/test_assign_container.py
index 4e0ba57666..fcee090724 100644
--- a/src/ifcopenshell-python/test/api/spatial/test_assign_container.py
+++ b/src/ifcopenshell-python/test/api/spatial/test_assign_container.py
@@ -18,14 +18,15 @@
import numpy
import pytest
-import test.bootstrap
-import ifcopenshell.api.root
-import ifcopenshell.api.unit
-import ifcopenshell.api.spatial
-import ifcopenshell.api.geometry
+
import ifcopenshell.api.aggregate
+import ifcopenshell.api.geometry
+import ifcopenshell.api.root
+import ifcopenshell.api.spatial
+import ifcopenshell.api.unit
import ifcopenshell.util.element
import ifcopenshell.util.placement
+import test.bootstrap
class TestAssignContainer(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/spatial/test_dereference_structure.py b/src/ifcopenshell-python/test/api/spatial/test_dereference_structure.py
index 9e618033e1..5f9d2b5099 100644
--- a/src/ifcopenshell-python/test/api/spatial/test_dereference_structure.py
+++ b/src/ifcopenshell-python/test/api/spatial/test_dereference_structure.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.spatial
import ifcopenshell.util.element
+import test.bootstrap
class TestDereferenceStructure(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/spatial/test_reference_structure.py b/src/ifcopenshell-python/test/api/spatial/test_reference_structure.py
index 013b0e4a18..6b5a3daeaa 100644
--- a/src/ifcopenshell-python/test/api/spatial/test_reference_structure.py
+++ b/src/ifcopenshell-python/test/api/spatial/test_reference_structure.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.spatial
import ifcopenshell.util.element
+import test.bootstrap
class TestReferenceStructure(test.bootstrap.IFC4):
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 795614e35d..efd89c990f 100644
--- a/src/ifcopenshell-python/test/api/spatial/test_unassign_container.py
+++ b/src/ifcopenshell-python/test/api/spatial/test_unassign_container.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.spatial
import ifcopenshell.util.element
import ifcopenshell.util.placement
+import test.bootstrap
class TestUnassignContainer(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/structural/test_add_structural_analysis_model.py b/src/ifcopenshell-python/test/api/structural/test_add_structural_analysis_model.py
index c7c715d1c0..3d19dd50eb 100644
--- a/src/ifcopenshell-python/test/api/structural/test_add_structural_analysis_model.py
+++ b/src/ifcopenshell-python/test/api/structural/test_add_structural_analysis_model.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.structural
+import test.bootstrap
class TestAddStructuralAnalysisModel(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/structural/test_assign_structural_analysis_model.py b/src/ifcopenshell-python/test/api/structural/test_assign_structural_analysis_model.py
index da09c38674..867630696b 100644
--- a/src/ifcopenshell-python/test/api/structural/test_assign_structural_analysis_model.py
+++ b/src/ifcopenshell-python/test/api/structural/test_assign_structural_analysis_model.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.structural
+import test.bootstrap
class TestAssignStructuralAnalysisModel(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/structural/test_edit_structural_analysis_model.py b/src/ifcopenshell-python/test/api/structural/test_edit_structural_analysis_model.py
index fddb8a9993..6deda5a833 100644
--- a/src/ifcopenshell-python/test/api/structural/test_edit_structural_analysis_model.py
+++ b/src/ifcopenshell-python/test/api/structural/test_edit_structural_analysis_model.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.structural
+import test.bootstrap
class TestEditStructuralAnalysisModel(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/structural/test_remove_structural_analysis_model.py b/src/ifcopenshell-python/test/api/structural/test_remove_structural_analysis_model.py
index b496dcc9a1..c330be81cb 100644
--- a/src/ifcopenshell-python/test/api/structural/test_remove_structural_analysis_model.py
+++ b/src/ifcopenshell-python/test/api/structural/test_remove_structural_analysis_model.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.structural
+import test.bootstrap
class TestRemoveStructuralAnalysisModel(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/structural/test_unassign_structural_analysis_model.py b/src/ifcopenshell-python/test/api/structural/test_unassign_structural_analysis_model.py
index c80842b7ad..43992acd3c 100644
--- a/src/ifcopenshell-python/test/api/structural/test_unassign_structural_analysis_model.py
+++ b/src/ifcopenshell-python/test/api/structural/test_unassign_structural_analysis_model.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.structural
+import test.bootstrap
class TestUnassignStructuralAnalysisModel(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/style/test_add_surface_style.py b/src/ifcopenshell-python/test/api/style/test_add_surface_style.py
index 83f176a690..dcfd42fd2c 100644
--- a/src/ifcopenshell-python/test/api/style/test_add_surface_style.py
+++ b/src/ifcopenshell-python/test/api/style/test_add_surface_style.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.style
+import test.bootstrap
class TestAddSurfaceStyle(test.bootstrap.IFC4):
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 78971148d7..12c1711baa 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
@@ -17,8 +17,9 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api.style
+import test.bootstrap
# TODO: add ifc2x3 tests after add_surface_textures will support ifc2x3
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 47f26ee6ac..7b7ea3df56 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,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell
+import ifcopenshell.api.material
import ifcopenshell.api.root
import ifcopenshell.api.style
-import ifcopenshell.api.material
+import test.bootstrap
class TestAssignMaterialStyleIFC2X3(test.bootstrap.IFC2X3):
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 9527813291..157acf49da 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,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell
import ifcopenshell.api.root
import ifcopenshell.api.style
+import test.bootstrap
class TestAssignRepresentationStyles(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/style/test_edit_surface_style.py b/src/ifcopenshell-python/test/api/style/test_edit_surface_style.py
index 5875396a7a..b8fc7e241b 100644
--- a/src/ifcopenshell-python/test/api/style/test_edit_surface_style.py
+++ b/src/ifcopenshell-python/test/api/style/test_edit_surface_style.py
@@ -17,8 +17,9 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api.style
+import test.bootstrap
class TestEditSurfaceStyle(test.bootstrap.IFC4):
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 1993ef3cf3..5b39ec655c 100644
--- a/src/ifcopenshell-python/test/api/style/test_remove_style.py
+++ b/src/ifcopenshell-python/test/api/style/test_remove_style.py
@@ -17,9 +17,10 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api.material
import ifcopenshell.api.style
+import test.bootstrap
class TestRemoveStyle(test.bootstrap.IFC4):
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 14f8173a3a..12ebf766f2 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
@@ -17,8 +17,9 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api.style
+import test.bootstrap
class TestRemoveSurfaceStyleIFC2X3(test.bootstrap.IFC2X3):
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 b009de1616..919f26e3c9 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,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell
+import ifcopenshell.api.material
import ifcopenshell.api.root
import ifcopenshell.api.style
-import ifcopenshell.api.material
+import test.bootstrap
class TestUnassignMaterialStyleIFC2X3(test.bootstrap.IFC2X3):
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 2138f6cb9b..ed7285b1de 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,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell
import ifcopenshell.api.root
import ifcopenshell.api.style
+import test.bootstrap
class TestUnassignRepresentationStyles(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/system/test_add_port.py b/src/ifcopenshell-python/test/api/system/test_add_port.py
index c2c420427c..ff8163fa15 100644
--- a/src/ifcopenshell-python/test/api/system/test_add_port.py
+++ b/src/ifcopenshell-python/test/api/system/test_add_port.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.system
import ifcopenshell.util.system
+import test.bootstrap
class TestAddPort(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/system/test_add_system.py b/src/ifcopenshell-python/test/api/system/test_add_system.py
index 8d98d5c3dd..1801a2332a 100644
--- a/src/ifcopenshell-python/test/api/system/test_add_system.py
+++ b/src/ifcopenshell-python/test/api/system/test_add_system.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.system
+import test.bootstrap
class TestAddSystem(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/system/test_assign_flow_control.py b/src/ifcopenshell-python/test/api/system/test_assign_flow_control.py
index e3d1df3bec..4ce38defa7 100644
--- a/src/ifcopenshell-python/test/api/system/test_assign_flow_control.py
+++ b/src/ifcopenshell-python/test/api/system/test_assign_flow_control.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.system
+import test.bootstrap
class TestAssignFlowControl(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/system/test_assign_port.py b/src/ifcopenshell-python/test/api/system/test_assign_port.py
index d17f2775d8..650496f875 100644
--- a/src/ifcopenshell-python/test/api/system/test_assign_port.py
+++ b/src/ifcopenshell-python/test/api/system/test_assign_port.py
@@ -17,13 +17,14 @@
# along with IfcOpenShell. If not, see .
import numpy
-import test.bootstrap
-import ifcopenshell.api.unit
+
+import ifcopenshell.api.geometry
import ifcopenshell.api.root
import ifcopenshell.api.system
-import ifcopenshell.api.geometry
+import ifcopenshell.api.unit
import ifcopenshell.util.placement
import ifcopenshell.util.system
+import test.bootstrap
class TestAssignPort(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/system/test_assign_system.py b/src/ifcopenshell-python/test/api/system/test_assign_system.py
index 22c26d9214..e262419d13 100644
--- a/src/ifcopenshell-python/test/api/system/test_assign_system.py
+++ b/src/ifcopenshell-python/test/api/system/test_assign_system.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api.root
import ifcopenshell.api.system
import ifcopenshell.util.system
+import test.bootstrap
class TestAssignSystem(test.bootstrap.IFC4):
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 8dd19d47fa..06d1fb7f26 100644
--- a/src/ifcopenshell-python/test/api/system/test_connect_port.py
+++ b/src/ifcopenshell-python/test/api/system/test_connect_port.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.system
import ifcopenshell.util.system
+import test.bootstrap
class TestConnectPort(test.bootstrap.IFC4):
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 a34fdfc615..4d782414a6 100644
--- a/src/ifcopenshell-python/test/api/system/test_disconnect_port.py
+++ b/src/ifcopenshell-python/test/api/system/test_disconnect_port.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.system
import ifcopenshell.util.system
+import test.bootstrap
class TestDisconnectPort(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/system/test_remove_system.py b/src/ifcopenshell-python/test/api/system/test_remove_system.py
index 44e00987d6..c347ae09a0 100644
--- a/src/ifcopenshell-python/test/api/system/test_remove_system.py
+++ b/src/ifcopenshell-python/test/api/system/test_remove_system.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
-import ifcopenshell.api.root
import ifcopenshell.api.pset
+import ifcopenshell.api.root
import ifcopenshell.api.system
+import test.bootstrap
class TestRemoveSystem(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/system/test_unassign_flow_control.py b/src/ifcopenshell-python/test/api/system/test_unassign_flow_control.py
index 22d2559561..afc20789fd 100644
--- a/src/ifcopenshell-python/test/api/system/test_unassign_flow_control.py
+++ b/src/ifcopenshell-python/test/api/system/test_unassign_flow_control.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.system
+import test.bootstrap
class TestUnassignFlowControl(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/system/test_unassign_port.py b/src/ifcopenshell-python/test/api/system/test_unassign_port.py
index b49de25f9a..711b17eeeb 100644
--- a/src/ifcopenshell-python/test/api/system/test_unassign_port.py
+++ b/src/ifcopenshell-python/test/api/system/test_unassign_port.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.system
import ifcopenshell.util.system
+import test.bootstrap
class TestAssignPort(test.bootstrap.IFC4):
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 8503dd82c3..7e60cbb07c 100644
--- a/src/ifcopenshell-python/test/api/system/test_unassign_system.py
+++ b/src/ifcopenshell-python/test/api/system/test_unassign_system.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api.root
import ifcopenshell.api.system
import ifcopenshell.util.system
+import test.bootstrap
class TestUnassignSystem(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/test_api.py b/src/ifcopenshell-python/test/api/test_api.py
index 8dca81d32f..55889cc627 100644
--- a/src/ifcopenshell-python/test/api/test_api.py
+++ b/src/ifcopenshell-python/test/api/test_api.py
@@ -16,16 +16,17 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.api.cost
-import ifcopenshell.api.root
-import test.bootstrap
-import ifcopenshell.api
-import ifcopenshell.api.control
-import ifcopenshell.api.sequence
-import ifcopenshell.util.element
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
+
def deprecation_check(test):
def new_test(self):
diff --git a/src/ifcopenshell-python/test/api/type/test_assign_type.py b/src/ifcopenshell-python/test/api/type/test_assign_type.py
index 21df8c8bba..009d4efedf 100644
--- a/src/ifcopenshell-python/test/api/type/test_assign_type.py
+++ b/src/ifcopenshell-python/test/api/type/test_assign_type.py
@@ -16,14 +16,15 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import pytest
+
+import ifcopenshell.api.geometry
+import ifcopenshell.api.material
import ifcopenshell.api.root
import ifcopenshell.api.type
-import ifcopenshell.api.material
-import ifcopenshell.api.geometry
import ifcopenshell.util.element
import ifcopenshell.util.representation
-import pytest
+import test.bootstrap
class TestAssignType(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/type/test_map_type_representation.py b/src/ifcopenshell-python/test/api/type/test_map_type_representation.py
index cd52591fd7..520c22e5f3 100644
--- a/src/ifcopenshell-python/test/api/type/test_map_type_representation.py
+++ b/src/ifcopenshell-python/test/api/type/test_map_type_representation.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.type
+import test.bootstrap
class TestMapTypeRepresentations(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/type/test_unassign_type.py b/src/ifcopenshell-python/test/api/type/test_unassign_type.py
index c37ae7214d..3f5adf1148 100644
--- a/src/ifcopenshell-python/test/api/type/test_unassign_type.py
+++ b/src/ifcopenshell-python/test/api/type/test_unassign_type.py
@@ -16,12 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import ifcopenshell.api.geometry
+import ifcopenshell.api.material
import ifcopenshell.api.root
import ifcopenshell.api.type
-import ifcopenshell.api.material
-import ifcopenshell.api.geometry
import ifcopenshell.util.element
+import test.bootstrap
class TestUnassignType(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/unit/test_add_context_dependent_unit.py b/src/ifcopenshell-python/test/api/unit/test_add_context_dependent_unit.py
index 705a2f0815..567d2cfd7a 100644
--- a/src/ifcopenshell-python/test/api/unit/test_add_context_dependent_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_add_context_dependent_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestAddContextDependentUnit(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/unit/test_add_conversion_based_unit.py b/src/ifcopenshell-python/test/api/unit/test_add_conversion_based_unit.py
index a29b9b2ad8..2286be6df1 100644
--- a/src/ifcopenshell-python/test/api/unit/test_add_conversion_based_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_add_conversion_based_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestAddConversionBasedUnitIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/unit/test_add_monetary_unit.py b/src/ifcopenshell-python/test/api/unit/test_add_monetary_unit.py
index 3d3e44bfe4..0e11f29882 100644
--- a/src/ifcopenshell-python/test/api/unit/test_add_monetary_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_add_monetary_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestAddMonetaryUnit(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/unit/test_add_si_unit.py b/src/ifcopenshell-python/test/api/unit/test_add_si_unit.py
index f618f9871e..b12cbd16ca 100644
--- a/src/ifcopenshell-python/test/api/unit/test_add_si_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_add_si_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestAddSIUnit(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/unit/test_assign_unit.py b/src/ifcopenshell-python/test/api/unit/test_assign_unit.py
index 21a136b257..66cee04442 100644
--- a/src/ifcopenshell-python/test/api/unit/test_assign_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_assign_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestAssignUnit(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/unit/test_edit_derived_unit.py b/src/ifcopenshell-python/test/api/unit/test_edit_derived_unit.py
index 679f5602b7..c97d55b407 100644
--- a/src/ifcopenshell-python/test/api/unit/test_edit_derived_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_edit_derived_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestEditDerivedUnit(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/unit/test_edit_monetary_unit.py b/src/ifcopenshell-python/test/api/unit/test_edit_monetary_unit.py
index d956b2fb04..a8bba121c0 100644
--- a/src/ifcopenshell-python/test/api/unit/test_edit_monetary_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_edit_monetary_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestEditMonetaryUnit(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/unit/test_edit_named_unit.py b/src/ifcopenshell-python/test/api/unit/test_edit_named_unit.py
index cc99e69eae..6f861f9cd8 100644
--- a/src/ifcopenshell-python/test/api/unit/test_edit_named_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_edit_named_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestEditNamedUnitIFC2X3(test.bootstrap.IFC2X3):
diff --git a/src/ifcopenshell-python/test/api/unit/test_remove_unit.py b/src/ifcopenshell-python/test/api/unit/test_remove_unit.py
index 5b3ab7bcc4..02df1ec562 100644
--- a/src/ifcopenshell-python/test/api/unit/test_remove_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_remove_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestRemoveUnit(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/api/unit/test_unassign_unit.py b/src/ifcopenshell-python/test/api/unit/test_unassign_unit.py
index 5a101e2018..a30a9570a9 100644
--- a/src/ifcopenshell-python/test/api/unit/test_unassign_unit.py
+++ b/src/ifcopenshell-python/test/api/unit/test_unassign_unit.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.unit
+import test.bootstrap
class TestUnassignUnit(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/bootstrap.py b/src/ifcopenshell-python/test/bootstrap.py
index 055ea8774a..1342be206c 100644
--- a/src/ifcopenshell-python/test/bootstrap.py
+++ b/src/ifcopenshell-python/test/bootstrap.py
@@ -26,9 +26,10 @@ if os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) == sys.path[0]
import pytest
+
import ifcopenshell
-import ifcopenshell.api.project
import ifcopenshell.api.owner.settings
+import ifcopenshell.api.project
class IFC4X3:
diff --git a/src/ifcopenshell-python/test/file_gc.py b/src/ifcopenshell-python/test/file_gc.py
index f28256a3d0..483c268e17 100644
--- a/src/ifcopenshell-python/test/file_gc.py
+++ b/src/ifcopenshell-python/test/file_gc.py
@@ -1,14 +1,16 @@
-import os
-import pytest
-import weakref
import itertools
+import os
+import weakref
+
+import pytest
+
import ifcopenshell
-import ifcopenshell.guid
-import ifcopenshell.api.pset
+import ifcopenshell.api.attribute
+import ifcopenshell.api.material
import ifcopenshell.api.owner
import ifcopenshell.api.project
-import ifcopenshell.api.material
-import ifcopenshell.api.attribute
+import ifcopenshell.api.pset
+import ifcopenshell.guid
import ifcopenshell.template
diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_00.py b/src/ifcopenshell-python/test/fixtures/rules/generate_00.py
index 251f501bec..e50e20a81e 100644
--- a/src/ifcopenshell-python/test/fixtures/rules/generate_00.py
+++ b/src/ifcopenshell-python/test/fixtures/rules/generate_00.py
@@ -1,4 +1,5 @@
import time
+
import ifcopenshell
for i in range(3):
diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_02.py b/src/ifcopenshell-python/test/fixtures/rules/generate_02.py
index 298fee7eba..5747fa589f 100644
--- a/src/ifcopenshell-python/test/fixtures/rules/generate_02.py
+++ b/src/ifcopenshell-python/test/fixtures/rules/generate_02.py
@@ -1,4 +1,5 @@
import time
+
import ifcopenshell
latitudes = [
diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_06.py b/src/ifcopenshell-python/test/fixtures/rules/generate_06.py
index b36c5108cb..fd9cca7153 100644
--- a/src/ifcopenshell-python/test/fixtures/rules/generate_06.py
+++ b/src/ifcopenshell-python/test/fixtures/rules/generate_06.py
@@ -1,5 +1,6 @@
import itertools
import time
+
import ifcopenshell
for pty, ety in itertools.product(("GRILLE", "USERDEFINED"), (None, "Something")):
diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_10.py b/src/ifcopenshell-python/test/fixtures/rules/generate_10.py
index b717411dfd..f4ac7209e8 100644
--- a/src/ifcopenshell-python/test/fixtures/rules/generate_10.py
+++ b/src/ifcopenshell-python/test/fixtures/rules/generate_10.py
@@ -1,4 +1,5 @@
import itertools
+
import ifcopenshell
defaults = {"Girth": 1.0, "WallThickness": 0.11}
diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_16.py b/src/ifcopenshell-python/test/fixtures/rules/generate_16.py
index 7b6a32dfb1..88964b17ff 100644
--- a/src/ifcopenshell-python/test/fixtures/rules/generate_16.py
+++ b/src/ifcopenshell-python/test/fixtures/rules/generate_16.py
@@ -1,4 +1,5 @@
import time
+
import ifcopenshell
names = [("Same", "Same"), ("Different", "SomethingElse")]
diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_17.py b/src/ifcopenshell-python/test/fixtures/rules/generate_17.py
index 2daa8b3b38..c313ac93a1 100644
--- a/src/ifcopenshell-python/test/fixtures/rules/generate_17.py
+++ b/src/ifcopenshell-python/test/fixtures/rules/generate_17.py
@@ -1,4 +1,5 @@
import time
+
import ifcopenshell
for i, nm in enumerate(("no-mls", "mls", "mlsu")):
diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_21.py b/src/ifcopenshell-python/test/fixtures/rules/generate_21.py
index f5fcc68b71..0d99acc560 100644
--- a/src/ifcopenshell-python/test/fixtures/rules/generate_21.py
+++ b/src/ifcopenshell-python/test/fixtures/rules/generate_21.py
@@ -1,4 +1,5 @@
import itertools
+
import ifcopenshell
diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_24.py b/src/ifcopenshell-python/test/fixtures/rules/generate_24.py
index c790a6103d..f792a169f6 100644
--- a/src/ifcopenshell-python/test/fixtures/rules/generate_24.py
+++ b/src/ifcopenshell-python/test/fixtures/rules/generate_24.py
@@ -1,4 +1,5 @@
import time
+
import ifcopenshell
for ents in [
diff --git a/src/ifcopenshell-python/test/fixtures/validate/generate_00.py b/src/ifcopenshell-python/test/fixtures/validate/generate_00.py
index 082804fa26..3d6db0620e 100644
--- a/src/ifcopenshell-python/test/fixtures/validate/generate_00.py
+++ b/src/ifcopenshell-python/test/fixtures/validate/generate_00.py
@@ -1,8 +1,8 @@
-import ifcopenshell
-import ifcopenshell.api.root
-import ifcopenshell.api.owner
from pathlib import Path
+import ifcopenshell
+import ifcopenshell.api.owner
+import ifcopenshell.api.root
guid1 = "3pdqyORIn8KBHZAhhtJ72T"
guid2 = "1sEzC8v31DshmvW5t5P631"
diff --git a/src/ifcopenshell-python/test/geom/geometry_tests.py b/src/ifcopenshell-python/test/geom/geometry_tests.py
index d84ef3e9ea..f18cb3206a 100644
--- a/src/ifcopenshell-python/test/geom/geometry_tests.py
+++ b/src/ifcopenshell-python/test/geom/geometry_tests.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import numpy as np
+
import ifcopenshell
import ifcopenshell.geom
import ifcopenshell.util.shape
import test.bootstrap
-import numpy as np
from ifcopenshell.util.shape_builder import ShapeBuilder, V
diff --git a/src/ifcopenshell-python/test/geom/polyhedral_shapes.py b/src/ifcopenshell-python/test/geom/polyhedral_shapes.py
index 2e58809f71..07ed5bf6e6 100644
--- a/src/ifcopenshell-python/test/geom/polyhedral_shapes.py
+++ b/src/ifcopenshell-python/test/geom/polyhedral_shapes.py
@@ -1,11 +1,10 @@
import collections
import numpy as np
-import ifcopenshell
-import ifcopenshell.geom
-
import pytest
+import ifcopenshell
+import ifcopenshell.geom
from test.bootstrap import file
diff --git a/src/ifcopenshell-python/test/geom/settings.py b/src/ifcopenshell-python/test/geom/settings.py
index c4e24b2027..3ede93b941 100644
--- a/src/ifcopenshell-python/test/geom/settings.py
+++ b/src/ifcopenshell-python/test/geom/settings.py
@@ -17,6 +17,7 @@
# along with IfcOpenShell. If not, see .
import numpy as np
+
import ifcopenshell
import ifcopenshell.api.context
import ifcopenshell.api.geometry
@@ -24,7 +25,6 @@ import ifcopenshell.api.profile
import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.geom
-import ifcopenshell.geom
import ifcopenshell.util.unit
import test.bootstrap
from ifcopenshell.util.shape_builder import ShapeBuilder
diff --git a/src/ifcopenshell-python/test/geom/stats.py b/src/ifcopenshell-python/test/geom/stats.py
index fd0cd8e337..9e2a9b2985 100644
--- a/src/ifcopenshell-python/test/geom/stats.py
+++ b/src/ifcopenshell-python/test/geom/stats.py
@@ -1,7 +1,9 @@
import os
+
+import pytest
+
import ifcopenshell
from ifcopenshell.geom.stats import StatsCollector
-import pytest
@pytest.mark.parametrize(
diff --git a/src/ifcopenshell-python/test/geom/test_sweeps.py b/src/ifcopenshell-python/test/geom/test_sweeps.py
index d77faec540..ac2b2faf6f 100644
--- a/src/ifcopenshell-python/test/geom/test_sweeps.py
+++ b/src/ifcopenshell-python/test/geom/test_sweeps.py
@@ -1,9 +1,10 @@
import pathlib
from collections.abc import Sequence
-import ifcopenshell
import pytest
+import ifcopenshell
+
def _bbox_from_vertices(verts: list[tuple[float, float, float]]):
if not verts:
diff --git a/src/ifcopenshell-python/test/global_id_updates.py b/src/ifcopenshell-python/test/global_id_updates.py
index 40b548f8c6..c128eef4a5 100644
--- a/src/ifcopenshell-python/test/global_id_updates.py
+++ b/src/ifcopenshell-python/test/global_id_updates.py
@@ -1,4 +1,5 @@
import pytest
+
import ifcopenshell
import ifcopenshell.guid
diff --git a/src/ifcopenshell-python/test/instance_string_formatting.py b/src/ifcopenshell-python/test/instance_string_formatting.py
index 2d85e99d26..6f5a096a57 100644
--- a/src/ifcopenshell-python/test/instance_string_formatting.py
+++ b/src/ifcopenshell-python/test/instance_string_formatting.py
@@ -1,4 +1,5 @@
import pytest
+
import ifcopenshell
import ifcopenshell.guid
diff --git a/src/ifcopenshell-python/test/test_create_shape.py b/src/ifcopenshell-python/test/test_create_shape.py
index bc743217bf..dfcb68c7be 100644
--- a/src/ifcopenshell-python/test/test_create_shape.py
+++ b/src/ifcopenshell-python/test/test_create_shape.py
@@ -3,8 +3,10 @@ import itertools
import multiprocessing
import operator
import os
+from typing import get_args
+
import pytest
-import test.bootstrap
+
import ifcopenshell
import ifcopenshell.api.context
import ifcopenshell.api.owner.settings
@@ -14,8 +16,8 @@ import ifcopenshell.api.unit
import ifcopenshell.geom
import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.shape
+import test.bootstrap
from ifcopenshell.util.shape_builder import ShapeBuilder
-from typing import get_args
fn = os.path.join(os.path.dirname(__file__), "fixtures/ColumnPSetsOfSets.ifc")
diff --git a/src/ifcopenshell-python/test/test_entity_instance.py b/src/ifcopenshell-python/test/test_entity_instance.py
index 6af57585d0..c031796b9f 100644
--- a/src/ifcopenshell-python/test/test_entity_instance.py
+++ b/src/ifcopenshell-python/test/test_entity_instance.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.element
+import test.bootstrap
class TestGetInfo2(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/test_file.py b/src/ifcopenshell-python/test/test_file.py
index 31c77cd6e6..062ef88b9f 100644
--- a/src/ifcopenshell-python/test/test_file.py
+++ b/src/ifcopenshell-python/test/test_file.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.element
+import test.bootstrap
class TestTransaction(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/test_file_inverse.py b/src/ifcopenshell-python/test/test_file_inverse.py
index 9d385ff0f0..d1708bc2bb 100644
--- a/src/ifcopenshell-python/test/test_file_inverse.py
+++ b/src/ifcopenshell-python/test/test_file_inverse.py
@@ -1,9 +1,11 @@
import gc
-import sys
-import pytest
-import pprint
-import weakref
import itertools
+import pprint
+import sys
+import weakref
+
+import pytest
+
import ifcopenshell
import ifcopenshell.api
diff --git a/src/ifcopenshell-python/test/test_guid.py b/src/ifcopenshell-python/test/test_guid.py
index 53af52bbed..ff361a2d77 100644
--- a/src/ifcopenshell-python/test/test_guid.py
+++ b/src/ifcopenshell-python/test/test_guid.py
@@ -20,15 +20,14 @@
# IMPORTS
# ----------------------------------------------------------------
+import string
from functools import reduce
from unittest import TestCase
-from pytest import mark
-from pytest import fixture
from uuid import uuid4
-import string
-from ifcopenshell.guid import compress
-from ifcopenshell.guid import expand
+from pytest import fixture, mark
+
+from ifcopenshell.guid import compress, expand
# ----------------------------------------------------------------
# FIXTURES
diff --git a/src/ifcopenshell-python/test/test_mvd_info.py b/src/ifcopenshell-python/test/test_mvd_info.py
index 80fe2f2154..7ba33481e6 100644
--- a/src/ifcopenshell-python/test/test_mvd_info.py
+++ b/src/ifcopenshell-python/test/test_mvd_info.py
@@ -1,5 +1,7 @@
import os
+
import pytest
+
import ifcopenshell
from ifcopenshell.util import mvd_info
from ifcopenshell.util.mvd_info import parse_mvd
diff --git a/src/ifcopenshell-python/test/test_open.py b/src/ifcopenshell-python/test/test_open.py
index 99f312c76e..7525adaa72 100644
--- a/src/ifcopenshell-python/test/test_open.py
+++ b/src/ifcopenshell-python/test/test_open.py
@@ -17,9 +17,10 @@
# along with IfcOpenShell. If not, see .
from pathlib import Path
-import pytest
-import ifcopenshell
+import pytest
+
+import ifcopenshell
TEST_FILE_DIR = Path(__file__).parent / "../../../test/input/"
diff --git a/src/ifcopenshell-python/test/test_package.py b/src/ifcopenshell-python/test/test_package.py
index 137c1079bf..b251e081c7 100644
--- a/src/ifcopenshell-python/test/test_package.py
+++ b/src/ifcopenshell-python/test/test_package.py
@@ -17,11 +17,12 @@
# along with IfcOpenShell. If not, see .
import http.client
-from pathlib import Path
from collections.abc import Sequence
-from typing_extensions import assert_never
+from pathlib import Path
from urllib.parse import urlparse
+from typing_extensions import assert_never
+
try:
from bs4 import BeautifulSoup
except:
diff --git a/src/ifcopenshell-python/test/test_rules.py b/src/ifcopenshell-python/test/test_rules.py
index a54e98ed68..9754405626 100644
--- a/src/ifcopenshell-python/test/test_rules.py
+++ b/src/ifcopenshell-python/test/test_rules.py
@@ -1,12 +1,12 @@
+import glob
import os
import sys
-import glob
import pytest
import tabulate
-import ifcopenshell.validate
import ifcopenshell.express.rule_executor
+import ifcopenshell.validate
@pytest.mark.parametrize(
diff --git a/src/ifcopenshell-python/test/test_sql.py b/src/ifcopenshell-python/test/test_sql.py
index 6d6c85786c..d0f11792c4 100644
--- a/src/ifcopenshell-python/test/test_sql.py
+++ b/src/ifcopenshell-python/test/test_sql.py
@@ -17,11 +17,13 @@
# along with IfcOpenShell. If not, see .
import tempfile
-import ifcpatch
-import ifcopenshell
from pathlib import Path
+
+import ifcpatch
from ifcpatch.recipes import Ifc2Sql
+import ifcopenshell
+
TEST_FILE = Path(__file__).parent / "files" / "basic.ifc"
SQLITE_PATH = None
diff --git a/src/ifcopenshell-python/test/test_stream.py b/src/ifcopenshell-python/test/test_stream.py
index e425fd1583..c463c3ccca 100644
--- a/src/ifcopenshell-python/test/test_stream.py
+++ b/src/ifcopenshell-python/test/test_stream.py
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import pytest
-import test.bootstrap
-import ifcopenshell
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_streaming_rocksdb_and_simpletyperefs.py b/src/ifcopenshell-python/test/test_streaming_rocksdb_and_simpletyperefs.py
index b0bfb2925a..32ea728df9 100644
--- a/src/ifcopenshell-python/test/test_streaming_rocksdb_and_simpletyperefs.py
+++ b/src/ifcopenshell-python/test/test_streaming_rocksdb_and_simpletyperefs.py
@@ -19,10 +19,12 @@
import gc
import os
import struct
-import pytest
-import ifcopenshell
import tempfile
+import pytest
+
+import ifcopenshell
+
try:
import psutil
except ImportError:
diff --git a/src/ifcopenshell-python/test/test_validate.py b/src/ifcopenshell-python/test/test_validate.py
index 16b12f223d..d3eff78f33 100644
--- a/src/ifcopenshell-python/test/test_validate.py
+++ b/src/ifcopenshell-python/test/test_validate.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import os
import glob
+import os
import pytest
diff --git a/src/ifcopenshell-python/test/test_validate_rocksdb.py b/src/ifcopenshell-python/test/test_validate_rocksdb.py
index 203d0ed2a4..6cfde4fddd 100644
--- a/src/ifcopenshell-python/test/test_validate_rocksdb.py
+++ b/src/ifcopenshell-python/test/test_validate_rocksdb.py
@@ -16,8 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import os
import glob
+import os
import tempfile
import time
diff --git a/src/ifcopenshell-python/test/test_wall_opening.py b/src/ifcopenshell-python/test/test_wall_opening.py
index 0e8c0d42cf..812a5420e2 100644
--- a/src/ifcopenshell-python/test/test_wall_opening.py
+++ b/src/ifcopenshell-python/test/test_wall_opening.py
@@ -16,17 +16,17 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import os
-import re
import glob
import json
-import typing
+import os
+import re
import shutil
import subprocess
-
+import typing
from dataclasses import dataclass, field
import pytest
+
import ifcopenshell
import ifcopenshell.guid
import ifcopenshell.template
diff --git a/src/ifcopenshell-python/test/test_write.py b/src/ifcopenshell-python/test/test_write.py
index e7a1f76b7c..1e55221d54 100644
--- a/src/ifcopenshell-python/test/test_write.py
+++ b/src/ifcopenshell-python/test/test_write.py
@@ -18,9 +18,10 @@
import tempfile
from pathlib import Path
-import pytest
-import ifcopenshell
+import pytest
+
+import ifcopenshell
TEST_FILE_DIR = Path(__file__).parent / "../../../test/input/"
diff --git a/src/ifcopenshell-python/test/typing_tests.py b/src/ifcopenshell-python/test/typing_tests.py
index c535960348..5b2d789613 100644
--- a/src/ifcopenshell-python/test/typing_tests.py
+++ b/src/ifcopenshell-python/test/typing_tests.py
@@ -22,10 +22,12 @@ Those tests are not automatically checked and just there to make sure overloads
"""
-import ifcopenshell
from typing import Union
+
from typing_extensions import assert_type
+import ifcopenshell
+
def ifcopenshell_open_test(str_: str, bool_: bool):
ifc_file = ifcopenshell.open(str_)
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 86d18bd356..82b9e02adc 100644
--- a/src/ifcopenshell-python/test/util/scripts/test_validate_stub.py
+++ b/src/ifcopenshell-python/test/util/scripts/test_validate_stub.py
@@ -17,6 +17,7 @@
# 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 494374f565..4b04e8a678 100644
--- a/src/ifcopenshell-python/test/util/test_attribute.py
+++ b/src/ifcopenshell-python/test/util/test_attribute.py
@@ -16,8 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell
import pytest
+
+import ifcopenshell
import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.attribute as subject
diff --git a/src/ifcopenshell-python/test/util/test_brick.py b/src/ifcopenshell-python/test/util/test_brick.py
index 61a9f413af..d0cffeaba9 100644
--- a/src/ifcopenshell-python/test/util/test_brick.py
+++ b/src/ifcopenshell-python/test/util/test_brick.py
@@ -17,10 +17,11 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api.root
import ifcopenshell.api.type
import ifcopenshell.util.brick as subject
+import test.bootstrap
class TestGetBrickTypeIFC4(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/util/test_classification.py b/src/ifcopenshell-python/test/util/test_classification.py
index 29820dc665..e006773d2a 100644
--- a/src/ifcopenshell-python/test/util/test_classification.py
+++ b/src/ifcopenshell-python/test/util/test_classification.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+import ifcopenshell.api.classification
import ifcopenshell.api.root
import ifcopenshell.api.type
-import ifcopenshell.api.classification
import ifcopenshell.util.classification as subject
+import test.bootstrap
class TestGetReferences(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/util/test_date.py b/src/ifcopenshell-python/test/util/test_date.py
index b57b2d158b..dd47244ba7 100644
--- a/src/ifcopenshell-python/test/util/test_date.py
+++ b/src/ifcopenshell-python/test/util/test_date.py
@@ -17,8 +17,9 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.util.date as subject
+import test.bootstrap
class TestReadableIFCDuration:
diff --git a/src/ifcopenshell-python/test/util/test_element.py b/src/ifcopenshell-python/test/util/test_element.py
index 2c62c6d7c5..1308e957c1 100644
--- a/src/ifcopenshell-python/test/util/test_element.py
+++ b/src/ifcopenshell-python/test/util/test_element.py
@@ -16,30 +16,31 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import pytest
+
+import ifcopenshell.api.aggregate
+import ifcopenshell.api.classification
+import ifcopenshell.api.context
import ifcopenshell.api.control
import ifcopenshell.api.cost
-import ifcopenshell.api.profile
-import pytest
-import test.bootstrap
+import ifcopenshell.api.document
import ifcopenshell.api.feature
-import ifcopenshell.api.pset
-import ifcopenshell.api.root
-import ifcopenshell.api.type
-import ifcopenshell.api.nest
-import ifcopenshell.api.style
+import ifcopenshell.api.geometry
+import ifcopenshell.api.group
import ifcopenshell.api.layer
import ifcopenshell.api.library
-import ifcopenshell.api.context
-import ifcopenshell.api.spatial
-import ifcopenshell.api.geometry
-import ifcopenshell.api.sequence
-import ifcopenshell.api.classification
import ifcopenshell.api.material
-import ifcopenshell.api.document
-import ifcopenshell.api.aggregate
-import ifcopenshell.api.group
+import ifcopenshell.api.nest
+import ifcopenshell.api.profile
+import ifcopenshell.api.pset
+import ifcopenshell.api.root
+import ifcopenshell.api.sequence
+import ifcopenshell.api.spatial
+import ifcopenshell.api.style
+import ifcopenshell.api.type
import ifcopenshell.guid
import ifcopenshell.util.element as subject
+import test.bootstrap
from ifcopenshell.util.shape_builder import ShapeBuilder
diff --git a/src/ifcopenshell-python/test/util/test_file.py b/src/ifcopenshell-python/test/util/test_file.py
index 6517bbd5d8..b7b34cd097 100644
--- a/src/ifcopenshell-python/test/util/test_file.py
+++ b/src/ifcopenshell-python/test/util/test_file.py
@@ -16,13 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import pytest
-import test.bootstrap
-import ifcopenshell.util.file as subject
import tempfile
import zipfile
from pathlib import Path
+import pytest
+
+import ifcopenshell.util.file as subject
+import test.bootstrap
HEADER_EXTRACTOR_TEST_FILE_STR = """
ISO-10303-21;
diff --git a/src/ifcopenshell-python/test/util/test_geolocation.py b/src/ifcopenshell-python/test/util/test_geolocation.py
index 59f70fcd7a..92775963c3 100644
--- a/src/ifcopenshell-python/test/util/test_geolocation.py
+++ b/src/ifcopenshell-python/test/util/test_geolocation.py
@@ -17,11 +17,12 @@
# along with IfcOpenShell. If not, see .
import numpy as np
-import test.bootstrap
-import ifcopenshell.api.root
+
import ifcopenshell.api.context
import ifcopenshell.api.georeference
+import ifcopenshell.api.root
import ifcopenshell.util.geolocation as subject
+import test.bootstrap
class TestXYZ2ENH(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/util/test_placement.py b/src/ifcopenshell-python/test/util/test_placement.py
index af428660fd..8a26c52ee5 100644
--- a/src/ifcopenshell-python/test/util/test_placement.py
+++ b/src/ifcopenshell-python/test/util/test_placement.py
@@ -17,8 +17,8 @@
# along with IfcOpenShell. If not, see .
import ifcopenshell
-import test.bootstrap
import ifcopenshell.util.placement as subject
+import test.bootstrap
class TestGetStoreyElevationIFC4(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/util/test_pset.py b/src/ifcopenshell-python/test/util/test_pset.py
index c99a0b86a6..ccfbcc4970 100644
--- a/src/ifcopenshell-python/test/util/test_pset.py
+++ b/src/ifcopenshell-python/test/util/test_pset.py
@@ -17,8 +17,8 @@
# along with IfcOpenShell. If not, see .
"""Run this test from src/ifcopenshell-python folder: pytest --durations=0 ifcopenshell/util/test_pset.py"""
-from ifcopenshell.util import pset
from ifcopenshell import util
+from ifcopenshell.util import pset
from ifcopenshell.util.pset import ApplicableEntity
diff --git a/src/ifcopenshell-python/test/util/test_schema.py b/src/ifcopenshell-python/test/util/test_schema.py
index aa24de6360..cb45b6e8db 100644
--- a/src/ifcopenshell-python/test/util/test_schema.py
+++ b/src/ifcopenshell-python/test/util/test_schema.py
@@ -16,9 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api.project
import ifcopenshell.util.schema as subject
+import test.bootstrap
class TestMigrator(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/util/test_selector.py b/src/ifcopenshell-python/test/util/test_selector.py
index 41bf0649e7..e4de678529 100644
--- a/src/ifcopenshell-python/test/util/test_selector.py
+++ b/src/ifcopenshell-python/test/util/test_selector.py
@@ -16,24 +16,25 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+import numpy as np
import pytest
-import test.bootstrap
-import ifcopenshell.api.spatial
-import ifcopenshell.api.root
-import ifcopenshell.api.unit
-import ifcopenshell.api.classification
-import ifcopenshell.api.pset
-import ifcopenshell.api.type
-import ifcopenshell.api.material
-import ifcopenshell.api.geometry
+
import ifcopenshell.api.aggregate
+import ifcopenshell.api.classification
+import ifcopenshell.api.geometry
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.selector as subject
import ifcopenshell.util.placement
import ifcopenshell.util.pset
-import numpy as np
+import ifcopenshell.util.selector as subject
+import test.bootstrap
class TestFormat:
diff --git a/src/ifcopenshell-python/test/util/test_shape_builder.py b/src/ifcopenshell-python/test/util/test_shape_builder.py
index a46c014fa7..87499b3288 100644
--- a/src/ifcopenshell-python/test/util/test_shape_builder.py
+++ b/src/ifcopenshell-python/test/util/test_shape_builder.py
@@ -16,27 +16,29 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from math import degrees, radians
+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 pytest
import test.bootstrap
-import ifcopenshell.api
-import numpy as np
from ifcopenshell.util.shape_builder import (
ShapeBuilder,
- is_x,
- np_rotation_matrix,
- np_to_3d,
- np_angle,
V,
+ is_x,
+ np_angle,
np_angle_signed,
- np_normal,
np_intersect_line_line,
np_matrix_to_euler,
+ np_normal,
+ np_rotation_matrix,
+ np_to_3d,
)
-from math import degrees, radians
-from typing import Any, Union
class TestMathutilsCompatibleMethods(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/util/test_system.py b/src/ifcopenshell-python/test/util/test_system.py
index 3e8c6d0159..f38971351a 100644
--- a/src/ifcopenshell-python/test/util/test_system.py
+++ b/src/ifcopenshell-python/test/util/test_system.py
@@ -16,14 +16,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
+from typing import get_args
+
import pytest
-import test.bootstrap
+
import ifcopenshell.api
import ifcopenshell.api.root
import ifcopenshell.api.system
import ifcopenshell.util.schema
import ifcopenshell.util.system as subject
-from typing import get_args
+import test.bootstrap
class TestValidateGroupTypes:
diff --git a/src/ifcopenshell-python/test/util/test_type.py b/src/ifcopenshell-python/test/util/test_type.py
index 6043238e73..54f0e6da16 100644
--- a/src/ifcopenshell-python/test/util/test_type.py
+++ b/src/ifcopenshell-python/test/util/test_type.py
@@ -17,9 +17,10 @@
# along with IfcOpenShell. If not, see .
import pytest
-import test.bootstrap
+
import ifcopenshell.api
import ifcopenshell.util.type as subject
+import test.bootstrap
class TestGetApplicableTypes(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/util/test_unit.py b/src/ifcopenshell-python/test/util/test_unit.py
index 6e28a28e70..5deef1884a 100644
--- a/src/ifcopenshell-python/test/util/test_unit.py
+++ b/src/ifcopenshell-python/test/util/test_unit.py
@@ -16,18 +16,20 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
+from math import pi
+
import numpy as np
+
import ifcopenshell.api.context
-import ifcopenshell.api.unit
-import ifcopenshell.api.root
import ifcopenshell.api.georeference
import ifcopenshell.api.pset
+import ifcopenshell.api.root
+import ifcopenshell.api.unit
import ifcopenshell.util.element
import ifcopenshell.util.geolocation
import ifcopenshell.util.unit as subject
+import test.bootstrap
from ifcopenshell.util.shape_builder import ShapeBuilder
-from math import pi
class TestCacheUnits(test.bootstrap.IFC4):
diff --git a/src/ifcopenshell-python/test/util/test_unit_conversion.py b/src/ifcopenshell-python/test/util/test_unit_conversion.py
index fa95260607..a3c8b702ef 100644
--- a/src/ifcopenshell-python/test/util/test_unit_conversion.py
+++ b/src/ifcopenshell-python/test/util/test_unit_conversion.py
@@ -16,9 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
import pathlib
-import pytest
-import ifcopenshell.util.unit
+
import numpy as np
+import pytest
+
+import ifcopenshell.util.unit
UNITS_FIXTURE_DIR = pathlib.Path(__file__).parent.parent / "fixtures" / "units"
diff --git a/src/ifcpatch/bootstrap.py b/src/ifcpatch/bootstrap.py
index 263da876ec..368d7b5cff 100644
--- a/src/ifcpatch/bootstrap.py
+++ b/src/ifcpatch/bootstrap.py
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
-import toposort
-import ifcpatch
-import ifcpatch.recipes
-import ifcopenshell.util.selector
import ifcopenshell.util.element
import ifcopenshell.util.schema
-
+import ifcopenshell.util.selector
import ifcpatch.__main__
+import ifcpatch.recipes
+import toposort
+
+import ifcpatch
diff --git a/src/ifcpatch/ifcpatch/__init__.py b/src/ifcpatch/ifcpatch/__init__.py
index 91acba3bd4..7ea668d55e 100644
--- a/src/ifcpatch/ifcpatch/__init__.py
+++ b/src/ifcpatch/ifcpatch/__init__.py
@@ -18,22 +18,22 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
-import os
-import shutil
-import sys
-import ifcopenshell
-import logging
-import typing
-import inspect
import collections
import importlib
import importlib.util
+import inspect
+import logging
+import os
import re
-from pathlib import Path
-from typing import Union, Optional, Any, TypedDict
-from typing_extensions import NotRequired
+import shutil
+import sys
+import typing
from collections.abc import Sequence
+from pathlib import Path
+from typing import Any, Optional, TypedDict, Union
+import ifcopenshell
+from typing_extensions import NotRequired
__version__ = version = "0.0.0"
diff --git a/src/ifcpatch/ifcpatch/__main__.py b/src/ifcpatch/ifcpatch/__main__.py
index 178259694d..ae01f9b594 100644
--- a/src/ifcpatch/ifcpatch/__main__.py
+++ b/src/ifcpatch/ifcpatch/__main__.py
@@ -19,9 +19,11 @@
# along with IfcPatch. If not, see .
import argparse
-import ifcpatch
+
import ifcopenshell
+import ifcpatch
+
parser = argparse.ArgumentParser(description="Patches IFC files to fix badly formatted data")
parser.add_argument("-i", "--input", type=str, required=True, help="The IFC file to patch")
parser.add_argument("-o", "--output", type=str, help="The output file to save the patched IFC")
diff --git a/src/ifcpatch/ifcpatch/recipes/AGS2IFC.py b/src/ifcpatch/ifcpatch/recipes/AGS2IFC.py
index 283d83a6b7..8067d2e718 100644
--- a/src/ifcpatch/ifcpatch/recipes/AGS2IFC.py
+++ b/src/ifcpatch/ifcpatch/recipes/AGS2IFC.py
@@ -17,22 +17,23 @@
# along with IfcPatch. If not, see .
-import os
import csv
-import numpy as np
+import os
+from itertools import cycle
+
import ifcopenshell
-import ifcopenshell.api.pset
-import ifcopenshell.api.root
-import ifcopenshell.api.unit
-import ifcopenshell.api.style
+import ifcopenshell.api.aggregate
import ifcopenshell.api.context
import ifcopenshell.api.document
-import ifcopenshell.api.project
-import ifcopenshell.api.spatial
import ifcopenshell.api.geometry
-import ifcopenshell.api.aggregate
+import ifcopenshell.api.project
+import ifcopenshell.api.pset
+import ifcopenshell.api.root
+import ifcopenshell.api.spatial
+import ifcopenshell.api.style
+import ifcopenshell.api.unit
import ifcopenshell.util.shape_builder
-from itertools import cycle
+import numpy as np
from ifcopenshell.util.shape_builder import V
diff --git a/src/ifcpatch/ifcpatch/recipes/AddGeometricRepresentationToAlignment.py b/src/ifcpatch/ifcpatch/recipes/AddGeometricRepresentationToAlignment.py
index b4c9cd2b6c..65f48f899d 100644
--- a/src/ifcpatch/ifcpatch/recipes/AddGeometricRepresentationToAlignment.py
+++ b/src/ifcpatch/ifcpatch/recipes/AddGeometricRepresentationToAlignment.py
@@ -16,13 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+import typing
+from logging import Logger
+from typing import Union
+
import ifcopenshell
import ifcopenshell.util.alignment
-import ifcpatch
-from logging import Logger
-import typing
-from typing import Union
+import ifcpatch
class Patcher(ifcpatch.BasePatcher):
diff --git a/src/ifcpatch/ifcpatch/recipes/AddLinearPlacementFallbackPosition.py b/src/ifcpatch/ifcpatch/recipes/AddLinearPlacementFallbackPosition.py
index 256dd8f5aa..9ec3f52a6a 100644
--- a/src/ifcpatch/ifcpatch/recipes/AddLinearPlacementFallbackPosition.py
+++ b/src/ifcpatch/ifcpatch/recipes/AddLinearPlacementFallbackPosition.py
@@ -16,13 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+import typing
+from logging import Logger
+from typing import Union
+
import ifcopenshell
import ifcopenshell.util.alignment
-import ifcpatch
-from logging import Logger
-import typing
-from typing import Union
+import ifcpatch
class Patcher(ifcpatch.BasePatcher):
diff --git a/src/ifcpatch/ifcpatch/recipes/AddZeroLengthSegmentToAlignment.py b/src/ifcpatch/ifcpatch/recipes/AddZeroLengthSegmentToAlignment.py
index aa6870939c..e1f6664cd0 100644
--- a/src/ifcpatch/ifcpatch/recipes/AddZeroLengthSegmentToAlignment.py
+++ b/src/ifcpatch/ifcpatch/recipes/AddZeroLengthSegmentToAlignment.py
@@ -16,13 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+import typing
+from logging import Logger
+from typing import Union
+
import ifcopenshell
import ifcopenshell.util.alignment
-import ifcpatch
-from logging import Logger
-import typing
-from typing import Union
+import ifcpatch
class Patcher(ifcpatch.BasePatcher):
diff --git a/src/ifcpatch/ifcpatch/recipes/AssignConstituentFractions.py b/src/ifcpatch/ifcpatch/recipes/AssignConstituentFractions.py
index 0989c6bd14..0b105a52f7 100644
--- a/src/ifcpatch/ifcpatch/recipes/AssignConstituentFractions.py
+++ b/src/ifcpatch/ifcpatch/recipes/AssignConstituentFractions.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+from logging import Logger
+
import ifcopenshell
import ifcopenshell.util.element
import ifcopenshell.util.unit
-from logging import Logger
class Patcher:
diff --git a/src/ifcpatch/ifcpatch/recipes/ConvertLengthUnit.py b/src/ifcpatch/ifcpatch/recipes/ConvertLengthUnit.py
index e82f12c281..6b3554b192 100644
--- a/src/ifcpatch/ifcpatch/recipes/ConvertLengthUnit.py
+++ b/src/ifcpatch/ifcpatch/recipes/ConvertLengthUnit.py
@@ -16,17 +16,18 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+import typing
+from logging import Logger
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.owner.settings
-import ifcopenshell.util.pset
import ifcopenshell.util.element
+import ifcopenshell.util.pset
import ifcopenshell.util.unit
-import ifcpatch
-from logging import Logger
-import typing
-from typing import Union
+import ifcpatch
LengthUnit = typing.Literal[
"ATTOMETER",
diff --git a/src/ifcpatch/ifcpatch/recipes/ConvertPropertiesToQuantities.py b/src/ifcpatch/ifcpatch/recipes/ConvertPropertiesToQuantities.py
index 74c28fb0e3..a9df2c93c4 100644
--- a/src/ifcpatch/ifcpatch/recipes/ConvertPropertiesToQuantities.py
+++ b/src/ifcpatch/ifcpatch/recipes/ConvertPropertiesToQuantities.py
@@ -16,13 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+from logging import Logger
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.pset
-import ifcopenshell.util.pset
import ifcopenshell.util.element
-from logging import Logger
-from typing import Union
+import ifcopenshell.util.pset
class Patcher:
diff --git a/src/ifcpatch/ifcpatch/recipes/ExtractElements.py b/src/ifcpatch/ifcpatch/recipes/ExtractElements.py
index 6f70a410b3..31f1fb4140 100644
--- a/src/ifcpatch/ifcpatch/recipes/ExtractElements.py
+++ b/src/ifcpatch/ifcpatch/recipes/ExtractElements.py
@@ -16,14 +16,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+from logging import Logger
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.project
import ifcopenshell.guid
import ifcopenshell.util.selector
+
import ifcpatch
-from typing import Union
-from logging import Logger
class Patcher(ifcpatch.BasePatcher):
diff --git a/src/ifcpatch/ifcpatch/recipes/ExtractPropertiesToSQLite.py b/src/ifcpatch/ifcpatch/recipes/ExtractPropertiesToSQLite.py
index 226052ae19..5df98c4ab4 100644
--- a/src/ifcpatch/ifcpatch/recipes/ExtractPropertiesToSQLite.py
+++ b/src/ifcpatch/ifcpatch/recipes/ExtractPropertiesToSQLite.py
@@ -17,11 +17,12 @@
# along with IfcPatch. If not, see .
+import json
import os
import re
-import json
-import time
import tempfile
+import time
+
import ifcopenshell
import ifcopenshell.util.element
diff --git a/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitDoorSwings.py b/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitDoorSwings.py
index 28860b58dc..cf602bab0a 100644
--- a/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitDoorSwings.py
+++ b/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitDoorSwings.py
@@ -22,13 +22,14 @@ import math
import os
from typing import Union
-import ifcpatch
import ifcopenshell
import ifcopenshell.geom
import ifcopenshell.util.element
import ifcopenshell.util.schema
import ifcopenshell.util.unit
+import ifcpatch
+
class Patcher(ifcpatch.BasePatcher):
def __init__(self, file: ifcopenshell.file, logger: Union[logging.Logger, None] = None):
diff --git a/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitSpaces.py b/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitSpaces.py
index d19bc8b26c..c6ea871c7b 100644
--- a/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitSpaces.py
+++ b/src/ifcpatch/ifcpatch/recipes/FixArchiCADToRevitSpaces.py
@@ -17,6 +17,7 @@
# along with IfcPatch. If not, see .
import logging
+
import ifcopenshell
@@ -67,11 +68,11 @@ class Patcher:
self.filepath = filepath
def patch(self) -> None:
- import bpy
import bonsai.tool as tool
+ import bpy
import ifcopenshell
import ifcopenshell.util.element
- from mathutils import Vector, Matrix
+ from mathutils import Matrix, Vector
if len(bpy.data.objects) > 0:
bpy.data.batch_remove(bpy.data.objects)
diff --git a/src/ifcpatch/ifcpatch/recipes/FixRevit2025TINs.py b/src/ifcpatch/ifcpatch/recipes/FixRevit2025TINs.py
index e18b4eed39..d6dc49be18 100644
--- a/src/ifcpatch/ifcpatch/recipes/FixRevit2025TINs.py
+++ b/src/ifcpatch/ifcpatch/recipes/FixRevit2025TINs.py
@@ -17,12 +17,13 @@
# along with IfcPatch. If not, see .
+import logging
+from typing import Optional
+
import ifcopenshell
import ifcopenshell.util.schema
import ifcopenshell.util.shape_builder
import ifcopenshell.util.unit
-import logging
-from typing import Optional
class Patcher:
@@ -110,9 +111,9 @@ class Patcher:
self.should_create_edges = should_create_edges
def patch(self) -> None:
- import bpy
import bmesh
import bonsai.tool as tool
+ import bpy
import ifcopenshell.util.shape_builder
bpy.context.scene.BIMProjectProperties.should_use_native_meshes = True
@@ -161,15 +162,15 @@ class Patcher:
self.file = tool.Ifc.get()
def create_edges(self, obj):
- import bpy
import bmesh
import bonsai.tool as tool
+ import bpy
+ import ifcopenshell.api.geometry
+ import ifcopenshell.api.root
+ import ifcopenshell.api.spatial
+ import ifcopenshell.api.type
import ifcopenshell.util.element
import ifcopenshell.util.representation
- import ifcopenshell.api.root
- import ifcopenshell.api.type
- import ifcopenshell.api.spatial
- import ifcopenshell.api.geometry
element = tool.Ifc.get_entity(obj)
data = obj.data
@@ -229,16 +230,17 @@ class Patcher:
def create_face_sampleable_object(self, obj):
# No sharp faces
- import bpy
+ from math import degrees
+
import bmesh
import bonsai.tool as tool
+ import bpy
+ import ifcopenshell.api.geometry
+ import ifcopenshell.api.root
+ import ifcopenshell.api.spatial
+ import ifcopenshell.api.type
import ifcopenshell.util.element
import ifcopenshell.util.representation
- import ifcopenshell.api.root
- import ifcopenshell.api.type
- import ifcopenshell.api.spatial
- import ifcopenshell.api.geometry
- from math import degrees
print("working on ", obj.name)
element = tool.Ifc.get_entity(obj)
@@ -278,16 +280,17 @@ class Patcher:
def create_edge_sampleable_object(self, obj):
# This is crazy but we need a sharp face per island
- import bpy
+ from math import degrees, radians, sin
+
import bmesh
import bonsai.tool as tool
+ import bpy
+ import ifcopenshell.api.geometry
+ import ifcopenshell.api.root
+ import ifcopenshell.api.spatial
+ import ifcopenshell.api.type
import ifcopenshell.util.element
import ifcopenshell.util.representation
- import ifcopenshell.api.root
- import ifcopenshell.api.type
- import ifcopenshell.api.spatial
- import ifcopenshell.api.geometry
- from math import degrees, radians, sin
from mathutils import Matrix
# Get the active object (assumed to have a mesh)
diff --git a/src/ifcpatch/ifcpatch/recipes/FixRevitTINs.py b/src/ifcpatch/ifcpatch/recipes/FixRevitTINs.py
index a673bf377c..872b1a0091 100644
--- a/src/ifcpatch/ifcpatch/recipes/FixRevitTINs.py
+++ b/src/ifcpatch/ifcpatch/recipes/FixRevitTINs.py
@@ -17,9 +17,10 @@
# along with IfcPatch. If not, see .
-import ifcopenshell
import logging
+import ifcopenshell
+
class Patcher:
def __init__(self, file: None, logger: logging.Logger, filepath: str, is_solid: bool = True):
@@ -79,10 +80,11 @@ class Patcher:
self.is_solid = is_solid
def patch(self) -> None:
- import bpy
+ from math import degrees
+
import bmesh
import bonsai.tool as tool
- from math import degrees
+ import bpy
props = tool.Project.get_project_props()
props.should_use_native_meshes = True
diff --git a/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py b/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py
index 1e8ac55b7c..74744f3487 100644
--- a/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py
+++ b/src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py
@@ -17,16 +17,18 @@
# along with IfcPatch. If not, see .
+import itertools
+import json
+import logging
+import multiprocessing
import os
import re
-import json
-import time
import tempfile
+import time
import typing
-import itertools
-import logging
-import numpy as np
-import multiprocessing
+from pathlib import Path
+from typing import TYPE_CHECKING, Any, Literal, Union
+
import ifcopenshell
import ifcopenshell.geom
import ifcopenshell.ifcopenshell_wrapper as W
@@ -37,15 +39,16 @@ import ifcopenshell.util.representation
import ifcopenshell.util.schema
import ifcopenshell.util.shape
import ifcopenshell.util.unit
-import ifcpatch
-from pathlib import Path
-from typing import Any, TYPE_CHECKING, Literal, Union
+import numpy as np
from typing_extensions import assert_never
+import ifcpatch
+
SQLTypes = typing.Literal["SQLite", "MySQL"]
if TYPE_CHECKING:
import sqlite3
+
import mysql.connector
import mysql.connector.abstracts
else:
diff --git a/src/ifcpatch/ifcpatch/recipes/MergeDuplicateTypes.py b/src/ifcpatch/ifcpatch/recipes/MergeDuplicateTypes.py
index fe82b33cfb..2c8385066b 100644
--- a/src/ifcpatch/ifcpatch/recipes/MergeDuplicateTypes.py
+++ b/src/ifcpatch/ifcpatch/recipes/MergeDuplicateTypes.py
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+from logging import Logger
+from typing import Any
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.type
import ifcopenshell.util.element
-from logging import Logger
-from typing import Any
class Patcher:
diff --git a/src/ifcpatch/ifcpatch/recipes/MergeProjects.py b/src/ifcpatch/ifcpatch/recipes/MergeProjects.py
index 9372f1d75f..ffb8e2e65b 100644
--- a/src/ifcpatch/ifcpatch/recipes/MergeProjects.py
+++ b/src/ifcpatch/ifcpatch/recipes/MergeProjects.py
@@ -16,14 +16,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
-import numpy as np
+from logging import Logger
+from typing import Union
+
import ifcopenshell
-import ifcopenshell.util.unit
import ifcopenshell.util.element
import ifcopenshell.util.geolocation
+import ifcopenshell.util.unit
+import numpy as np
+
from ifcpatch.recipes.SetFalseOrigin import Patcher as SetFalseOrigin
-from typing import Union
-from logging import Logger
class Patcher:
diff --git a/src/ifcpatch/ifcpatch/recipes/MergeStyles.py b/src/ifcpatch/ifcpatch/recipes/MergeStyles.py
index 5c1fa2f4fa..c6df956bbe 100644
--- a/src/ifcpatch/ifcpatch/recipes/MergeStyles.py
+++ b/src/ifcpatch/ifcpatch/recipes/MergeStyles.py
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
-import ifcopenshell
-import ifcopenshell.util.element
-import ifcpatch
import logging
from typing import Union
+import ifcopenshell
+import ifcopenshell.util.element
+
+import ifcpatch
+
class Patcher(ifcpatch.BasePatcher):
def __init__(self, file: ifcopenshell.file, logger: Union[logging.Logger, None] = None):
diff --git a/src/ifcpatch/ifcpatch/recipes/Migrate.py b/src/ifcpatch/ifcpatch/recipes/Migrate.py
index 9f330e9016..6b5c18ff11 100644
--- a/src/ifcpatch/ifcpatch/recipes/Migrate.py
+++ b/src/ifcpatch/ifcpatch/recipes/Migrate.py
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+import typing
+from logging import Logger
+from typing import Union
+
import ifcopenshell
import ifcopenshell.util.schema
+
import ifcpatch
-import typing
-from typing import Union
-from logging import Logger
class Patcher(ifcpatch.BasePatcher):
diff --git a/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py b/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py
index e147b783d2..a575fc4eac 100644
--- a/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py
+++ b/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py
@@ -17,10 +17,11 @@
# along with IfcPatch. If not, see .
import math
-import numpy as np
+import typing
+
import ifcopenshell
import ifcopenshell.util.placement
-import typing
+import numpy as np
from ifcopenshell.util.shape_builder import ShapeBuilder
diff --git a/src/ifcpatch/ifcpatch/recipes/PatchStationReferentPosition.py b/src/ifcpatch/ifcpatch/recipes/PatchStationReferentPosition.py
index 556c43a094..cd3a4fb523 100644
--- a/src/ifcpatch/ifcpatch/recipes/PatchStationReferentPosition.py
+++ b/src/ifcpatch/ifcpatch/recipes/PatchStationReferentPosition.py
@@ -1,11 +1,12 @@
+import typing
+from logging import Logger
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api.alignment
import ifcopenshell.util.element
-import ifcpatch
-from logging import Logger
-import typing
-from typing import Union
+import ifcpatch
class Patcher(ifcpatch.BasePatcher):
diff --git a/src/ifcpatch/ifcpatch/recipes/PurgeData.py b/src/ifcpatch/ifcpatch/recipes/PurgeData.py
index 5ef1af6102..3c34927a63 100644
--- a/src/ifcpatch/ifcpatch/recipes/PurgeData.py
+++ b/src/ifcpatch/ifcpatch/recipes/PurgeData.py
@@ -17,9 +17,10 @@
# along with IfcPatch. If not, see .
import datetime
-import ifcopenshell
from logging import Logger
+import ifcopenshell
+
class Patcher:
def __init__(self, file: ifcopenshell.file, logger: Logger):
diff --git a/src/ifcpatch/ifcpatch/recipes/RecycleNonRootedElements.py b/src/ifcpatch/ifcpatch/recipes/RecycleNonRootedElements.py
index 93ab762778..f66b375ae3 100644
--- a/src/ifcpatch/ifcpatch/recipes/RecycleNonRootedElements.py
+++ b/src/ifcpatch/ifcpatch/recipes/RecycleNonRootedElements.py
@@ -16,8 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
-from collections import deque
import logging
+from collections import deque
+
import ifcopenshell.util.element
diff --git a/src/ifcpatch/ifcpatch/recipes/RegenerateGlobalIds.py b/src/ifcpatch/ifcpatch/recipes/RegenerateGlobalIds.py
index 0c3475725d..8e0a8ab976 100644
--- a/src/ifcpatch/ifcpatch/recipes/RegenerateGlobalIds.py
+++ b/src/ifcpatch/ifcpatch/recipes/RegenerateGlobalIds.py
@@ -16,9 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+from logging import Logger
+
import ifcopenshell
import ifcopenshell.guid
-from logging import Logger
class Patcher:
diff --git a/src/ifcpatch/ifcpatch/recipes/ResetAbsoluteCoordinates.py b/src/ifcpatch/ifcpatch/recipes/ResetAbsoluteCoordinates.py
index 0136a6de9c..641ba928b1 100644
--- a/src/ifcpatch/ifcpatch/recipes/ResetAbsoluteCoordinates.py
+++ b/src/ifcpatch/ifcpatch/recipes/ResetAbsoluteCoordinates.py
@@ -17,10 +17,11 @@
# along with IfcPatch. If not, see .
import logging
+from typing import Literal, Optional, Union
+
+import ifcopenshell
import numpy as np
import numpy.typing as npt
-import ifcopenshell
-from typing import Literal, Optional, Union
class Patcher:
diff --git a/src/ifcpatch/ifcpatch/recipes/ResetSpatialElementLocations.py b/src/ifcpatch/ifcpatch/recipes/ResetSpatialElementLocations.py
index fca2a5ee11..0f7c3933b4 100644
--- a/src/ifcpatch/ifcpatch/recipes/ResetSpatialElementLocations.py
+++ b/src/ifcpatch/ifcpatch/recipes/ResetSpatialElementLocations.py
@@ -16,8 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
-import ifcopenshell
import logging
+
+import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.geometry
import ifcopenshell.util
diff --git a/src/ifcpatch/ifcpatch/recipes/SetFalseOrigin.py b/src/ifcpatch/ifcpatch/recipes/SetFalseOrigin.py
index e22f4787d1..72218e5ecf 100644
--- a/src/ifcpatch/ifcpatch/recipes/SetFalseOrigin.py
+++ b/src/ifcpatch/ifcpatch/recipes/SetFalseOrigin.py
@@ -16,11 +16,17 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+import typing
+
import ifcopenshell
import ifcopenshell.api.georeference
import ifcopenshell.util.geolocation
-from ifcpatch.recipes import OffsetObjectPlacements, SetWorldCoordinateSystem, ResetSpatialElementLocations
-import typing
+
+from ifcpatch.recipes import (
+ OffsetObjectPlacements,
+ ResetSpatialElementLocations,
+ SetWorldCoordinateSystem,
+)
class Patcher:
diff --git a/src/ifcpatch/ifcpatch/recipes/SetWorldCoordinateSystem.py b/src/ifcpatch/ifcpatch/recipes/SetWorldCoordinateSystem.py
index d5c2e8da94..080da3ef7f 100644
--- a/src/ifcpatch/ifcpatch/recipes/SetWorldCoordinateSystem.py
+++ b/src/ifcpatch/ifcpatch/recipes/SetWorldCoordinateSystem.py
@@ -17,9 +17,10 @@
# along with IfcPatch. If not, see .
import math
-import numpy as np
import typing
+import numpy as np
+
class Patcher:
def __init__(
diff --git a/src/ifcpatch/ifcpatch/recipes/SplitByBuildingStorey.py b/src/ifcpatch/ifcpatch/recipes/SplitByBuildingStorey.py
index 1d0b4c02f0..2f83fbb208 100644
--- a/src/ifcpatch/ifcpatch/recipes/SplitByBuildingStorey.py
+++ b/src/ifcpatch/ifcpatch/recipes/SplitByBuildingStorey.py
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
-import os
import logging
-import ifcopenshell
+import os
from pathlib import Path
from typing import Union
+import ifcopenshell
+
class Patcher:
def __init__(self, file: ifcopenshell.file, logger: logging.Logger, output_dir: Union[str, None] = None):
@@ -45,10 +46,11 @@ class Patcher:
self.output_dir = output_dir
def patch(self) -> None:
- import ifcopenshell
import tempfile
from shutil import copyfile
+ import ifcopenshell
+
if self.output_dir is None:
output_dir = Path()
else:
diff --git a/src/ifcpatch/ifcpatch/recipes/TessellateElements.py b/src/ifcpatch/ifcpatch/recipes/TessellateElements.py
index 0638568fe4..14ee80aec2 100644
--- a/src/ifcpatch/ifcpatch/recipes/TessellateElements.py
+++ b/src/ifcpatch/ifcpatch/recipes/TessellateElements.py
@@ -16,16 +16,17 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+import multiprocessing
+from logging import Logger
+from typing import Union
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.geometry
import ifcopenshell.geom
+import ifcopenshell.util.representation
import ifcopenshell.util.selector
import ifcopenshell.util.shape
-import ifcopenshell.util.representation
-import multiprocessing
-from logging import Logger
-from typing import Union
class Patcher:
diff --git a/src/ifcpatch/ifcpatch/recipes/UnsharePsets.py b/src/ifcpatch/ifcpatch/recipes/UnsharePsets.py
index fa7f1b083c..e7a1ad9eb1 100644
--- a/src/ifcpatch/ifcpatch/recipes/UnsharePsets.py
+++ b/src/ifcpatch/ifcpatch/recipes/UnsharePsets.py
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcPatch. If not, see .
+from logging import Logger
+
import ifcopenshell
import ifcopenshell.api.pset
import ifcopenshell.guid
import ifcopenshell.util.element
import ifcopenshell.util.selector
-from logging import Logger
class Patcher:
diff --git a/src/ifcpatch/test/bootstrap.py b/src/ifcpatch/test/bootstrap.py
index d4d1d07c2e..7c6dfec558 100644
--- a/src/ifcpatch/test/bootstrap.py
+++ b/src/ifcpatch/test/bootstrap.py
@@ -16,11 +16,11 @@
# 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.api.project
import ifcopenshell.api.owner.settings
+import ifcopenshell.api.project
+import pytest
class IFC4X3:
diff --git a/src/ifcpatch/test/test_ConvertLengthUnit.py b/src/ifcpatch/test/test_ConvertLengthUnit.py
index 85e451110a..a4f586512f 100644
--- a/src/ifcpatch/test/test_ConvertLengthUnit.py
+++ b/src/ifcpatch/test/test_ConvertLengthUnit.py
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api
import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.util.unit
+
import ifcpatch
+import test.bootstrap
class TestConvertLengthUnit(test.bootstrap.IFC4):
diff --git a/src/ifcpatch/test/test_ConvertPropertiesToQuantities.py b/src/ifcpatch/test/test_ConvertPropertiesToQuantities.py
index 830495f74f..d25dcd9d1d 100644
--- a/src/ifcpatch/test/test_ConvertPropertiesToQuantities.py
+++ b/src/ifcpatch/test/test_ConvertPropertiesToQuantities.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcpatch
import ifcopenshell
import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.util.element
+
+import ifcpatch
import test.bootstrap
diff --git a/src/ifcpatch/test/test_ExtractElements.py b/src/ifcpatch/test/test_ExtractElements.py
index 8df5095256..fe2e9350dd 100644
--- a/src/ifcpatch/test/test_ExtractElements.py
+++ b/src/ifcpatch/test/test_ExtractElements.py
@@ -17,14 +17,16 @@
# along with IfcOpenShell. If not, see .
import os
-import pytest
-import ifcpatch
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.root
import ifcopenshell.api.spatial
import ifcopenshell.util.element
+import pytest
+
+import ifcpatch
import test.bootstrap
diff --git a/src/ifcpatch/test/test_Ifc2Sql.py b/src/ifcpatch/test/test_Ifc2Sql.py
index e5c40fe245..79257a69c3 100644
--- a/src/ifcpatch/test/test_Ifc2Sql.py
+++ b/src/ifcpatch/test/test_Ifc2Sql.py
@@ -17,7 +17,8 @@
# along with IfcOpenShell. If not, see .
import tempfile
-import ifcpatch
+from pathlib import Path
+
import ifcopenshell
import ifcopenshell.api.context
import ifcopenshell.api.geometry
@@ -28,7 +29,8 @@ import ifcopenshell.util.placement
import ifcopenshell.util.representation
import ifcopenshell.util.shape
import ifcopenshell.util.shape_builder
-from pathlib import Path
+
+import ifcpatch
class TestIfc2Sql:
diff --git a/src/ifcpatch/test/test_MergeDuplicateTypes.py b/src/ifcpatch/test/test_MergeDuplicateTypes.py
index 37e37d39b4..439f7a0c06 100644
--- a/src/ifcpatch/test/test_MergeDuplicateTypes.py
+++ b/src/ifcpatch/test/test_MergeDuplicateTypes.py
@@ -17,8 +17,7 @@
# along with IfcOpenShell. If not, see .
import os
-import pytest
-import ifcpatch
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.geometry
@@ -27,6 +26,9 @@ import ifcopenshell.api.root
import ifcopenshell.api.type
import ifcopenshell.util.element
import ifcopenshell.util.representation
+import pytest
+
+import ifcpatch
import test.bootstrap
diff --git a/src/ifcpatch/test/test_MergeProject.py b/src/ifcpatch/test/test_MergeProject.py
index 6384e98dd8..35fcb0719f 100644
--- a/src/ifcpatch/test/test_MergeProject.py
+++ b/src/ifcpatch/test/test_MergeProject.py
@@ -16,7 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcpatch
+import tempfile
+from pathlib import Path
+from typing import Optional
+
import ifcopenshell
import ifcopenshell.api.context
import ifcopenshell.api.geometry
@@ -29,11 +32,10 @@ import ifcopenshell.util.placement
import ifcopenshell.util.representation
import ifcopenshell.util.shape
import ifcopenshell.util.shape_builder
-import test.bootstrap
-import tempfile
import numpy as np
-from pathlib import Path
-from typing import Optional
+
+import ifcpatch
+import test.bootstrap
class TestMergeProjects(test.bootstrap.IFC4):
diff --git a/src/ifcpatch/test/test_Migrate.py b/src/ifcpatch/test/test_Migrate.py
index afefd9d3fb..319e01d91b 100644
--- a/src/ifcpatch/test/test_Migrate.py
+++ b/src/ifcpatch/test/test_Migrate.py
@@ -16,8 +16,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcpatch
import ifcopenshell
+
+import ifcpatch
import test.bootstrap
diff --git a/src/ifcpatch/test/test_RegenerateGlobalIds.py b/src/ifcpatch/test/test_RegenerateGlobalIds.py
index 3cc4d9026f..e51e4c7a9c 100644
--- a/src/ifcpatch/test/test_RegenerateGlobalIds.py
+++ b/src/ifcpatch/test/test_RegenerateGlobalIds.py
@@ -17,12 +17,14 @@
# along with IfcOpenShell. If not, see .
import os
-import pytest
-import ifcpatch
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.root
import ifcopenshell.util.element
+import pytest
+
+import ifcpatch
import test.bootstrap
diff --git a/src/ifcpatch/test/test_ResetSpatialElementLocations.py b/src/ifcpatch/test/test_ResetSpatialElementLocations.py
index 1ae7c63c6f..5d446c9128 100644
--- a/src/ifcpatch/test/test_ResetSpatialElementLocations.py
+++ b/src/ifcpatch/test/test_ResetSpatialElementLocations.py
@@ -16,16 +16,17 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import test.bootstrap
import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.geometry
import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.util.placement
-import ifcpatch
import numpy as np
+import ifcpatch
+import test.bootstrap
+
class TestResetSpatialElementLocations(test.bootstrap.IFC4):
def test_run(self):
diff --git a/src/ifcpatch/test/test_SetFalseOrigin.py b/src/ifcpatch/test/test_SetFalseOrigin.py
index da4e621f04..1357ec39b0 100644
--- a/src/ifcpatch/test/test_SetFalseOrigin.py
+++ b/src/ifcpatch/test/test_SetFalseOrigin.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 test.bootstrap
import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.context
@@ -27,9 +26,11 @@ import ifcopenshell.api.unit
import ifcopenshell.util.element
import ifcopenshell.util.geolocation
import ifcopenshell.util.placement
-import ifcpatch
import numpy as np
+import ifcpatch
+import test.bootstrap
+
class TestSetFalseOrigin(test.bootstrap.IFC4):
def test_run(self):
diff --git a/src/ifcpatch/test/test_TesselateElements.py b/src/ifcpatch/test/test_TesselateElements.py
index 83ea349137..7acdc899a7 100644
--- a/src/ifcpatch/test/test_TesselateElements.py
+++ b/src/ifcpatch/test/test_TesselateElements.py
@@ -16,19 +16,20 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcopenshell.util.representation
-import ifcpatch
import ifcopenshell
import ifcopenshell.api.context
import ifcopenshell.api.geometry
import ifcopenshell.api.profile
import ifcopenshell.api.root
import ifcopenshell.api.unit
-import test.bootstrap
import ifcopenshell.geom
import ifcopenshell.util.element
+import ifcopenshell.util.representation
from ifcopenshell.util.shape_builder import ShapeBuilder
+import ifcpatch
+import test.bootstrap
+
class TestTesselateElements(test.bootstrap.IFC4):
def test_run(self):
diff --git a/src/ifcpatch/test/test_UnsharePsets.py b/src/ifcpatch/test/test_UnsharePsets.py
index d2226223bc..fc40bdb74d 100644
--- a/src/ifcpatch/test/test_UnsharePsets.py
+++ b/src/ifcpatch/test/test_UnsharePsets.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see .
-import ifcpatch
import ifcopenshell
import ifcopenshell.api.pset
import ifcopenshell.geom
import ifcopenshell.util.element
+
+import ifcpatch
import test.bootstrap
diff --git a/src/ifcpatch/test/test_ifcpatch.py b/src/ifcpatch/test/test_ifcpatch.py
index 90ff3937fa..4d7e98e55a 100644
--- a/src/ifcpatch/test/test_ifcpatch.py
+++ b/src/ifcpatch/test/test_ifcpatch.py
@@ -17,10 +17,12 @@
# along with IfcOpenShell. If not, see .
import tempfile
-import ifcopenshell.api.root
-import ifcpatch
from pathlib import Path
+import ifcopenshell.api.root
+
+import ifcpatch
+
class Test:
def test_parsing_docs(self):
diff --git a/src/ifcsverchok/__init__.py b/src/ifcsverchok/__init__.py
index c655baed52..660ea6f707 100644
--- a/src/ifcsverchok/__init__.py
+++ b/src/ifcsverchok/__init__.py
@@ -31,6 +31,7 @@ bl_info = {
import importlib
import logging
import types
+
import bpy
from bpy_extras.io_utils import ExportHelper
@@ -141,12 +142,14 @@ imported_modules = make_node_list()
reload_event = False
from os.path import splitext
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.root
import ifcopenshell.api.spatial
import ifcopenshell.util.element
+
from ifcsverchok.ifcstore import SvIfcStore
diff --git a/src/ifcsverchok/helper.py b/src/ifcsverchok/helper.py
index 411809e025..d20626f365 100644
--- a/src/ifcsverchok/helper.py
+++ b/src/ifcsverchok/helper.py
@@ -16,11 +16,12 @@
# You should have received a copy of the GNU General Public License
# along with IfcSverchok. If not, see .
+from typing import Any, TypeVar, Union
+
import bpy
import ifcopenshell
import sverchok.core.sockets
from sverchok.data_structure import zip_long_repeat
-from typing import Any, Union, TypeVar
T_socket = TypeVar("T_socket", bound=sverchok.core.sockets.SvSocketCommon)
diff --git a/src/ifcsverchok/ifcstore.py b/src/ifcsverchok/ifcstore.py
index e99a97aa6d..6fda9b2cea 100644
--- a/src/ifcsverchok/ifcstore.py
+++ b/src/ifcsverchok/ifcstore.py
@@ -16,13 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with IfcSverchok. If not, see .
+from typing import Any, Union
+
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.context
import ifcopenshell.util.representation
from ifcopenshell import template
-from typing import Union, Any
class SvIfcStore:
diff --git a/src/ifcsverchok/nodes/ifc/add.py b/src/ifcsverchok/nodes/ifc/add.py
index 5aab0da1f1..c6ed124eb7 100644
--- a/src/ifcsverchok/nodes/ifc/add.py
+++ b/src/ifcsverchok/nodes/ifc/add.py
@@ -18,11 +18,12 @@
import bpy
import ifcopenshell
+from bpy.props import StringProperty
+from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode
class SvIfcAdd(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/add_pset.py b/src/ifcsverchok/nodes/ifc/add_pset.py
index 4e6f0d7674..3cd25cd4dc 100644
--- a/src/ifcsverchok/nodes/ifc/add_pset.py
+++ b/src/ifcsverchok/nodes/ifc/add_pset.py
@@ -16,22 +16,20 @@
# You should have received a copy of the GNU General Public License
# along with IfcSverchok. If not, see .
-import bpy
-
-import ifcopenshell
-import sverchok.core.sockets
-import ifcsverchok.helper
-import ifcsverchok.helper as helper
-from ifcsverchok.ifcstore import SvIfcStore
-
import json
+
+import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.pset
-
+import sverchok.core.sockets
from bpy.props import StringProperty
+from sverchok.data_structure import flatten_data, updateNode
from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, flatten_data
+
+import ifcsverchok.helper
+import ifcsverchok.helper as helper
+from ifcsverchok.ifcstore import SvIfcStore
class SvIfcAddPset(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/add_spatial_element.py b/src/ifcsverchok/nodes/ifc/add_spatial_element.py
index c96b5e2d14..f53dc3fa16 100644
--- a/src/ifcsverchok/nodes/ifc/add_spatial_element.py
+++ b/src/ifcsverchok/nodes/ifc/add_spatial_element.py
@@ -16,27 +16,26 @@
# You should have received a copy of the GNU General Public License
# along with IfcSverchok. If not, see .
-import bpy
-
from itertools import chain
+import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.root
import ifcopenshell.api.spatial
import ifcopenshell.util.element
-import ifcsverchok.helper
-from ifcsverchok.ifcstore import SvIfcStore
-
from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import (
- updateNode,
+ ensure_min_nesting,
flatten_data,
repeat_last_for_length,
- ensure_min_nesting,
+ updateNode,
)
+from sverchok.node_tree import SverchCustomTreeNode
+
+import ifcsverchok.helper
+from ifcsverchok.ifcstore import SvIfcStore
class SvIfcAddSpatialElement(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/api.py b/src/ifcsverchok/nodes/ifc/api.py
index af0b8766dd..ce75275db4 100644
--- a/src/ifcsverchok/nodes/ifc/api.py
+++ b/src/ifcsverchok/nodes/ifc/api.py
@@ -16,17 +16,19 @@
# You should have received a copy of the GNU General Public License
# along with IfcSverchok. If not, see .
+import logging
+from typing import Any, Union
+
import bpy
import ifcopenshell
import ifcopenshell.api
import sverchok.core.sockets
+from bpy.props import EnumProperty, StringProperty
+from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
-from bpy.props import StringProperty, EnumProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode
-import logging
-from typing import Union, Any
logger = logging.getLogger("sverchok.ifc")
diff --git a/src/ifcsverchok/nodes/ifc/bmesh_to_ifc.py b/src/ifcsverchok/nodes/ifc/bmesh_to_ifc.py
index ab748ecd50..8d623ffe1e 100644
--- a/src/ifcsverchok/nodes/ifc/bmesh_to_ifc.py
+++ b/src/ifcsverchok/nodes/ifc/bmesh_to_ifc.py
@@ -19,31 +19,38 @@
from copy import deepcopy
from decimal import Context
from email.policy import default
+from itertools import chain, cycle
+
+import bonsai.core.geometry as core
+import bonsai.tool as tool
import bpy
import ifcopenshell
-import ifcsverchok.helper
import ifcopenshell.api
import ifcopenshell.api.context
import ifcopenshell.api.geometry
import ifcopenshell.util.representation
-from ifcsverchok.ifcstore import SvIfcStore
-import bonsai.tool as tool
-import bonsai.core.geometry as core
+from bonsai.bim.module.root.prop import get_contexts
from bpy.props import (
- StringProperty,
+ BoolProperty,
EnumProperty,
IntProperty,
- BoolProperty,
PointerProperty,
+ StringProperty,
+)
+from mathutils import Matrix
+from sverchok.core.socket_data import sv_get_socket
+from sverchok.data_structure import (
+ fixed_iter,
+ flat_iter,
+ flatten_data,
+ node_id,
+ updateNode,
+ zip_long_repeat,
)
from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, flatten_data, fixed_iter, flat_iter
-from bonsai.bim.module.root.prop import get_contexts
-from sverchok.data_structure import zip_long_repeat, node_id
-from sverchok.core.socket_data import sv_get_socket
-from itertools import chain, cycle
-from mathutils import Matrix
+import ifcsverchok.helper
+from ifcsverchok.ifcstore import SvIfcStore
class SvIfcBMeshToIfcRepr(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/by_guid.py b/src/ifcsverchok/nodes/ifc/by_guid.py
index 43bea96c84..029b1b11a5 100644
--- a/src/ifcsverchok/nodes/ifc/by_guid.py
+++ b/src/ifcsverchok/nodes/ifc/by_guid.py
@@ -20,12 +20,13 @@ import itertools
import bpy
import ifcopenshell
+from bpy.props import StringProperty
+from sverchok.data_structure import flatten_data, updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
from ifcsverchok.ifcstore import SvIfcStore
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, flatten_data
class SvIfcByGuid(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/by_id.py b/src/ifcsverchok/nodes/ifc/by_id.py
index e985f4d0e6..78ce51415f 100644
--- a/src/ifcsverchok/nodes/ifc/by_id.py
+++ b/src/ifcsverchok/nodes/ifc/by_id.py
@@ -18,12 +18,13 @@
import bpy
+from bpy.props import StringProperty
+from sverchok.data_structure import flatten_data, updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
from ifcsverchok.ifcstore import SvIfcStore
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, flatten_data
class SvIfcById(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/by_query.py b/src/ifcsverchok/nodes/ifc/by_query.py
index 95f9ca654f..1bdd88054a 100644
--- a/src/ifcsverchok/nodes/ifc/by_query.py
+++ b/src/ifcsverchok/nodes/ifc/by_query.py
@@ -19,11 +19,12 @@
import bpy
import ifcopenshell
import ifcopenshell.util.selector
+from bpy.props import StringProperty
+from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
from ifcsverchok.ifcstore import SvIfcStore
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode
class SvIfcByQuery(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/by_type.py b/src/ifcsverchok/nodes/ifc/by_type.py
index c4c6f9bdb7..2e6d9b43f4 100644
--- a/src/ifcsverchok/nodes/ifc/by_type.py
+++ b/src/ifcsverchok/nodes/ifc/by_type.py
@@ -18,11 +18,12 @@
import bpy
import ifcopenshell
-import ifcsverchok.helper
-from bpy.props import StringProperty, EnumProperty
-from ifcsverchok.ifcstore import SvIfcStore
-from sverchok.node_tree import SverchCustomTreeNode
+from bpy.props import EnumProperty, StringProperty
from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
+import ifcsverchok.helper
+from ifcsverchok.ifcstore import SvIfcStore
def get_ifc_products(self, context):
diff --git a/src/ifcsverchok/nodes/ifc/create_entity.py b/src/ifcsverchok/nodes/ifc/create_entity.py
index 0bfb88b786..bc63b3bc08 100644
--- a/src/ifcsverchok/nodes/ifc/create_entity.py
+++ b/src/ifcsverchok/nodes/ifc/create_entity.py
@@ -17,25 +17,25 @@
# along with IfcSverchok. If not, see .
import bpy
-from mathutils import Matrix
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.geometry
import ifcopenshell.api.root
import ifcopenshell.util.schema
+from bpy.props import BoolProperty, StringProperty
+from mathutils import Matrix
+from sverchok.data_structure import (
+ ensure_min_nesting,
+ flatten_data,
+ repeat_last_for_length,
+ updateNode,
+)
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
from ifcsverchok.ifcstore import SvIfcStore
-from bpy.props import StringProperty, BoolProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import (
- updateNode,
- flatten_data,
- repeat_last_for_length,
- ensure_min_nesting,
-)
-
class SvIfcCreateEntity(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
bl_idname = "SvIfcCreateEntity"
diff --git a/src/ifcsverchok/nodes/ifc/create_file.py b/src/ifcsverchok/nodes/ifc/create_file.py
index 50a77a5198..1d10d0fd3e 100644
--- a/src/ifcsverchok/nodes/ifc/create_file.py
+++ b/src/ifcsverchok/nodes/ifc/create_file.py
@@ -19,12 +19,13 @@
import bpy
import ifcopenshell
import ifcopenshell.guid
-import ifcsverchok.helper
-import ifcsverchok.helper as helper
import sverchok.core.sockets
from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
+import ifcsverchok.helper
+import ifcsverchok.helper as helper
class SvIfcCreateFileRefresh(bpy.types.Operator):
diff --git a/src/ifcsverchok/nodes/ifc/create_project.py b/src/ifcsverchok/nodes/ifc/create_project.py
index cc782de19d..4f0b19a398 100644
--- a/src/ifcsverchok/nodes/ifc/create_project.py
+++ b/src/ifcsverchok/nodes/ifc/create_project.py
@@ -22,9 +22,10 @@ import ifcopenshell.api
import ifcopenshell.api.context
import ifcopenshell.api.root
import ifcopenshell.api.unit
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
-from sverchok.node_tree import SverchCustomTreeNode
class SvIfcCreateProject(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/create_shape.py b/src/ifcsverchok/nodes/ifc/create_shape.py
index 381fc1e11c..7b94008952 100644
--- a/src/ifcsverchok/nodes/ifc/create_shape.py
+++ b/src/ifcsverchok/nodes/ifc/create_shape.py
@@ -16,16 +16,18 @@
# You should have received a copy of the GNU General Public License
# along with IfcSverchok. If not, see .
-import bpy
import logging
+
+import bonsai.bim.import_ifc
+import bpy
import ifcopenshell
import ifcopenshell.geom
+from bpy.props import BoolProperty, PointerProperty, StringProperty
+from sverchok.data_structure import flatten_data, updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
from ifcsverchok.ifcstore import SvIfcStore
-import bonsai.bim.import_ifc
-from bpy.props import StringProperty, PointerProperty, BoolProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, flatten_data
class SvIfcCreateShape(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/generate_guid.py b/src/ifcsverchok/nodes/ifc/generate_guid.py
index cd706bc6a4..26f50e8ae6 100644
--- a/src/ifcsverchok/nodes/ifc/generate_guid.py
+++ b/src/ifcsverchok/nodes/ifc/generate_guid.py
@@ -19,9 +19,10 @@
import bpy
import ifcopenshell
import ifcopenshell.guid
-import ifcsverchok.helper
from sverchok.node_tree import SverchCustomTreeNode
+import ifcsverchok.helper
+
class SvIfcGenerateGuid(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
bl_idname = "SvIfcGenerateGuid"
diff --git a/src/ifcsverchok/nodes/ifc/get_attribute.py b/src/ifcsverchok/nodes/ifc/get_attribute.py
index c4ec65e30e..e809500de3 100644
--- a/src/ifcsverchok/nodes/ifc/get_attribute.py
+++ b/src/ifcsverchok/nodes/ifc/get_attribute.py
@@ -19,11 +19,12 @@
import bpy
import ifcopenshell
import ifcopenshell.util.element
+from bpy.props import StringProperty
+from sverchok.data_structure import flatten_data, updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
from ifcsverchok.ifcstore import SvIfcStore
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, flatten_data
class SvIfcGetAttribute(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/get_property.py b/src/ifcsverchok/nodes/ifc/get_property.py
index a9a78e15b9..f99dff7aa3 100644
--- a/src/ifcsverchok/nodes/ifc/get_property.py
+++ b/src/ifcsverchok/nodes/ifc/get_property.py
@@ -19,11 +19,12 @@
import bpy
import ifcopenshell
import ifcopenshell.util.element
+from bpy.props import StringProperty
+from sverchok.data_structure import flatten_data, updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
from ifcsverchok.ifcstore import SvIfcStore
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, flatten_data
class SvIfcGetProperty(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/pick_ifc_class.py b/src/ifcsverchok/nodes/ifc/pick_ifc_class.py
index 3cbbf03af0..b24d499708 100644
--- a/src/ifcsverchok/nodes/ifc/pick_ifc_class.py
+++ b/src/ifcsverchok/nodes/ifc/pick_ifc_class.py
@@ -18,11 +18,12 @@
import bpy
import ifcopenshell
-import ifcsverchok.helper
from bpy.props import EnumProperty
-from ifcsverchok.ifcstore import SvIfcStore
-from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
+import ifcsverchok.helper
+from ifcsverchok.ifcstore import SvIfcStore
def get_ifc_products(self, context):
diff --git a/src/ifcsverchok/nodes/ifc/quick_project_setup.py b/src/ifcsverchok/nodes/ifc/quick_project_setup.py
index 49c621d8ba..5787e29187 100644
--- a/src/ifcsverchok/nodes/ifc/quick_project_setup.py
+++ b/src/ifcsverchok/nodes/ifc/quick_project_setup.py
@@ -18,15 +18,17 @@
from email.mime import application
+
import bpy
import ifcopenshell
import sverchok.core.sockets
+from bpy.props import StringProperty
+from ifcopenshell import template
+from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode
-from ifcopenshell import template
class SvIfcQuickProjectSetup(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/read_entity.py b/src/ifcsverchok/nodes/ifc/read_entity.py
index 9ea2fa3490..38a703151d 100644
--- a/src/ifcsverchok/nodes/ifc/read_entity.py
+++ b/src/ifcsverchok/nodes/ifc/read_entity.py
@@ -18,11 +18,12 @@
import bpy
import ifcopenshell
+from bpy.props import StringProperty
+from sverchok.data_structure import ensure_min_nesting, flatten_data, updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
from ifcsverchok.ifcstore import SvIfcStore
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, ensure_min_nesting, flatten_data
class SvIfcReadEntity(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/read_file.py b/src/ifcsverchok/nodes/ifc/read_file.py
index ab754d7278..758bd6b14f 100644
--- a/src/ifcsverchok/nodes/ifc/read_file.py
+++ b/src/ifcsverchok/nodes/ifc/read_file.py
@@ -19,11 +19,12 @@
import bpy
import ifcopenshell
import ifcopenshell.guid
+from bpy.props import StringProperty
+from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode
class SvIfcReadFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/remove.py b/src/ifcsverchok/nodes/ifc/remove.py
index 2e76d28896..6a85086fd2 100644
--- a/src/ifcsverchok/nodes/ifc/remove.py
+++ b/src/ifcsverchok/nodes/ifc/remove.py
@@ -16,14 +16,16 @@
# You should have received a copy of the GNU General Public License
# along with IfcSverchok. If not, see .
+from typing import Union
+
import bpy
import ifcopenshell
+from bpy.props import StringProperty
+from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode
-from typing import Union
class SvIfcRemove(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/select_blender_objects.py b/src/ifcsverchok/nodes/ifc/select_blender_objects.py
index 5067db7ccf..3a0053a514 100644
--- a/src/ifcsverchok/nodes/ifc/select_blender_objects.py
+++ b/src/ifcsverchok/nodes/ifc/select_blender_objects.py
@@ -16,15 +16,16 @@
# You should have received a copy of the GNU General Public License
# along with IfcSverchok. If not, see .
+import bonsai.tool as tool
import bpy
import ifcopenshell
import ifcopenshell.util.selector
-import bonsai.tool as tool
+from bpy.props import StringProperty
+from sverchok.data_structure import updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
-from bpy.props import StringProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode
class SvIfcSelectBlenderObjectsRefresh(bpy.types.Operator):
diff --git a/src/ifcsverchok/nodes/ifc/sverchok_to_ifc.py b/src/ifcsverchok/nodes/ifc/sverchok_to_ifc.py
index f9a6701432..69ac5f37f3 100644
--- a/src/ifcsverchok/nodes/ifc/sverchok_to_ifc.py
+++ b/src/ifcsverchok/nodes/ifc/sverchok_to_ifc.py
@@ -18,15 +18,16 @@
import bpy
import ifcopenshell
-import ifcsverchok.helper
import ifcopenshell.api
import ifcopenshell.api.context
import ifcopenshell.api.geometry
import ifcopenshell.util.representation
-from ifcsverchok.ifcstore import SvIfcStore
-from bpy.props import StringProperty, EnumProperty, IntProperty, FloatVectorProperty
+from bpy.props import EnumProperty, FloatVectorProperty, IntProperty, StringProperty
+from sverchok.data_structure import ensure_min_nesting, updateNode
from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, ensure_min_nesting
+
+import ifcsverchok.helper
+from ifcsverchok.ifcstore import SvIfcStore
class SvIfcSverchokToIfcRepr(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifcsverchok/nodes/ifc/write_file.py b/src/ifcsverchok/nodes/ifc/write_file.py
index 245c8a9d62..3a25cd99cc 100644
--- a/src/ifcsverchok/nodes/ifc/write_file.py
+++ b/src/ifcsverchok/nodes/ifc/write_file.py
@@ -17,6 +17,7 @@
# along with IfcSverchok. If not, see .
from os.path import abspath, splitext
+
import bpy
import ifcopenshell
import ifcopenshell.api
@@ -24,12 +25,13 @@ import ifcopenshell.api.aggregate
import ifcopenshell.api.root
import ifcopenshell.api.spatial
import ifcopenshell.util.element
+from bpy.props import BoolProperty, StringProperty
+from sverchok.data_structure import flatten_data, updateNode
+from sverchok.node_tree import SverchCustomTreeNode
+
import ifcsverchok.helper
import ifcsverchok.helper as helper
from ifcsverchok.ifcstore import SvIfcStore
-from bpy.props import StringProperty, BoolProperty
-from sverchok.node_tree import SverchCustomTreeNode
-from sverchok.data_structure import updateNode, flatten_data
class SvIfcWriteFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
diff --git a/src/ifctester/ifctester/__main__.py b/src/ifctester/ifctester/__main__.py
index e0acdd5468..d961b5e667 100644
--- a/src/ifctester/ifctester/__main__.py
+++ b/src/ifctester/ifctester/__main__.py
@@ -18,13 +18,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcTester. If not, see .
-import time
import argparse
-import ifcopenshell
-from . import ids
-from . import reporter
+import time
from pathlib import Path
+import ifcopenshell
+
+from . import ids, reporter
+
parser = argparse.ArgumentParser(description="Uses an IDS to audit an IFC")
parser.add_argument("ids", type=str, help="Path to an IDS")
parser.add_argument("ifc", type=str, help="Path to an IFC", nargs="?")
diff --git a/src/ifctester/ifctester/facet.py b/src/ifctester/ifctester/facet.py
index 6b5536299d..b8c3ebad5d 100644
--- a/src/ifctester/ifctester/facet.py
+++ b/src/ifctester/ifctester/facet.py
@@ -17,15 +17,17 @@
# along with IfcTester. If not, see .
from __future__ import annotations
-import re
+
import builtins
-import ifcopenshell.util.unit
-import ifcopenshell.util.element
-import ifcopenshell.util.classification
+import re
from functools import lru_cache
-from xmlschema.validators import identities
-from typing import Union, Optional, Any, Literal, TYPE_CHECKING, TypedDict
from logging import Logger
+from typing import TYPE_CHECKING, Any, Literal, Optional, TypedDict, Union
+
+import ifcopenshell.util.classification
+import ifcopenshell.util.element
+import ifcopenshell.util.unit
+from xmlschema.validators import identities
if TYPE_CHECKING:
from .ids import Specification
diff --git a/src/ifctester/ifctester/ids.py b/src/ifctester/ifctester/ids.py
index 7aecf040d3..ea21aa15fd 100644
--- a/src/ifctester/ifctester/ids.py
+++ b/src/ifctester/ifctester/ids.py
@@ -17,28 +17,30 @@
# along with IfcTester. If not, see .
from __future__ import annotations
-import os
+
import datetime
-import ifcopenshell
-from xmlschema.validators.exceptions import XMLSchemaValidationError
-from xmlschema import XMLSchema
-from xmlschema import etree_tostring
+import os
+from typing import Any, Optional, Union
from xml.etree import ElementTree as ET
+
+import ifcopenshell
+from xmlschema import XMLSchema, etree_tostring
+from xmlschema.validators.exceptions import XMLSchemaValidationError
+
from .facet import (
- Facet,
- Entity,
Attribute,
+ Cardinality,
Classification,
- Property,
- PartOf,
+ Entity,
+ Facet,
+ FacetFailure,
Material,
+ PartOf,
+ Property,
Restriction,
get_pset,
get_psets,
- Cardinality,
- FacetFailure,
)
-from typing import Optional, Union, Any
cwd = os.path.dirname(os.path.realpath(__file__))
schema = None
diff --git a/src/ifctester/ifctester/reporter.py b/src/ifctester/ifctester/reporter.py
index 2ce8a8c45f..220d0f96a9 100644
--- a/src/ifctester/ifctester/reporter.py
+++ b/src/ifctester/ifctester/reporter.py
@@ -17,18 +17,21 @@
# along with IfcTester. If not, see .
from __future__ import annotations
+
+import datetime
+import math
import os
import re
import sys
-import math
-import datetime
+from typing import Literal, Optional, TypedDict, Union
+
import ifcopenshell
import ifcopenshell.util.element
import ifcopenshell.util.placement
import ifcopenshell.util.unit
-from .ids import Specification, Ids
+
from .facet import Facet, FacetFailure
-from typing import TypedDict, Union, Literal, Optional
+from .ids import Ids, Specification
cwd = os.path.dirname(os.path.realpath(__file__))
@@ -555,7 +558,7 @@ class Ods(Json):
def to_file(self, filepath: str) -> None:
from odf.opendocument import OpenDocumentSpreadsheet
from odf.style import Style, TableCellProperties
- from odf.table import Table, TableRow, TableCell
+ from odf.table import Table, TableCell, TableRow
from odf.text import P
self.doc = OpenDocumentSpreadsheet()
@@ -696,7 +699,7 @@ class OdsSummary(Json):
def to_file(self, filepath: str) -> None:
from odf.opendocument import OpenDocumentSpreadsheet
from odf.style import Style, TableCellProperties
- from odf.table import Table, TableRow, TableCell
+ from odf.table import Table, TableCell, TableRow
from odf.text import P
self.doc = OpenDocumentSpreadsheet()
diff --git a/src/ifctester/test/ids_doc_generator.py b/src/ifctester/test/ids_doc_generator.py
index fa95854d35..a8323fbeed 100644
--- a/src/ifctester/test/ids_doc_generator.py
+++ b/src/ifctester/test/ids_doc_generator.py
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcTester. If not, see .
+import functools
import os
import re
import uuid
-import pytest
-import functools
+from pathlib import Path
+from xml.dom.minidom import parseString
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.aggregate
@@ -32,15 +34,15 @@ import ifcopenshell.api.spatial
import ifcopenshell.api.type
import ifcopenshell.api.unit
import ifcopenshell.guid
-import ifctester
+import numpy as np
+import pytest
import test_facet
import test_ids
-import numpy as np
-from pathlib import Path
-from xml.dom.minidom import parseString
-from ifctester import ids
from ifcopenshell import validate
+import ifctester
+from ifctester import ids
+
outdir = "build"
diff --git a/src/ifctester/test/test_facet.py b/src/ifctester/test/test_facet.py
index 3d7518d99f..2e0a16ec85 100644
--- a/src/ifctester/test/test_facet.py
+++ b/src/ifctester/test/test_facet.py
@@ -18,6 +18,7 @@
import uuid
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.aggregate
@@ -33,9 +34,17 @@ import ifcopenshell.api.type
import ifcopenshell.api.unit
import ifcopenshell.guid
import ifcopenshell.util.pset
-import ifctester.ids
import ifctester.facet
-from ifctester.facet import Entity, Attribute, Classification, Property, PartOf, Material, Restriction
+import ifctester.ids
+from ifctester.facet import (
+ Attribute,
+ Classification,
+ Entity,
+ Material,
+ PartOf,
+ Property,
+ Restriction,
+)
def set_facet(facet):
diff --git a/src/ifctester/test/test_ids.py b/src/ifctester/test/test_ids.py
index 9985a14a2c..0a851a355c 100644
--- a/src/ifctester/test/test_ids.py
+++ b/src/ifctester/test/test_ids.py
@@ -17,13 +17,15 @@
# along with IfcTester. If not, see .
import os
-import pytest
-import xmlschema
+from typing import Optional
+
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.material
+import pytest
+import xmlschema
+
from ifctester import ids
-from typing import Optional
def run(
diff --git a/src/ifctester/webapp/public/worker/api.py b/src/ifctester/webapp/public/worker/api.py
index d5b77d846d..dafc61c646 100644
--- a/src/ifctester/webapp/public/worker/api.py
+++ b/src/ifctester/webapp/public/worker/api.py
@@ -1,11 +1,12 @@
+import xml.etree.ElementTree as ET
+
import ifcopenshell
import ifcopenshell.util
import ifcopenshell.util.attribute
import ifcopenshell.util.pset
import ifcopenshell.util.schema
-import xml.etree.ElementTree as ET
-from xmlschema.validators.exceptions import XMLSchemaValidationError
from ifctester.ids import Ids, IdsXmlValidationError, get_schema
+from xmlschema.validators.exceptions import XMLSchemaValidationError
# https://github.com/buildingSMART/IDS/blob/9914d568c7ac037acd97e58a0d16e9f93c3e3416/Schema/ids.xsd#L232
ifc_schemas = ["IFC2X3", "IFC4", "IFC4X3_ADD2"]
diff --git a/src/ifctester/webapp/serve.py b/src/ifctester/webapp/serve.py
index 245d50c38f..5b18f15545 100644
--- a/src/ifctester/webapp/serve.py
+++ b/src/ifctester/webapp/serve.py
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcTester. If not, see .
-import os
-import sys
import argparse
import mimetypes
+import os
+import sys
bonsai_lib_path = os.environ.get("BONSAI_LIB_PATH")
print(os.environ)
@@ -29,7 +29,7 @@ bonsai_version = os.environ.get("BONSAI_VERSION")
if bonsai_lib_path:
sys.path.insert(0, bonsai_lib_path)
-from flask import Flask, send_from_directory, send_file
+from flask import Flask, send_file, send_from_directory
# Browsers expecting this specific MIME type for .mjs files,
# otherwise they fail to load.
diff --git a/src/opencdeserver/api/app/api/bcf.py b/src/opencdeserver/api/app/api/bcf.py
index 58a907730f..81047e1f23 100644
--- a/src/opencdeserver/api/app/api/bcf.py
+++ b/src/opencdeserver/api/app/api/bcf.py
@@ -1,19 +1,16 @@
from uuid import UUID
-from fastapi import APIRouter, Depends, UploadFile, HTTPException
+
+from fastapi import APIRouter, Depends, HTTPException, UploadFile
from fastapi.responses import FileResponse
-
-from security.secure import get_current_active_user
-
from models.bcf_request import *
from models.bcf_response import *
-from models.request import *
from models.other import *
-
+from models.request import *
from repository.bcf import bcf_db
+from security.secure import get_current_active_user
from api.logging import LoggingRoute
-
router = APIRouter(route_class=LoggingRoute)
# ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
diff --git a/src/opencdeserver/api/app/api/documents.py b/src/opencdeserver/api/app/api/documents.py
index c22ab0506f..2c60fe0139 100644
--- a/src/opencdeserver/api/app/api/documents.py
+++ b/src/opencdeserver/api/app/api/documents.py
@@ -1,27 +1,22 @@
import collections
import os
import shutil
-import traceback
import sys
-
-from fastapi import HTTPException, status, APIRouter, Request, Depends
-from fastapi import UploadFile, Form
-from fastapi.responses import FileResponse, HTMLResponse
-from fastapi.templating import Jinja2Templates
-from fastapi.encoders import jsonable_encoder
-
+import traceback
from typing import Union
from uuid import UUID, uuid4
-from pydantic import ValidationError
-from security.secure import get_current_active_user
-
-from repository.documents import doc_db
-
-from models.documents_request import *
-from models.documents_response import *
+from fastapi import APIRouter, Depends, Form, HTTPException, Request, UploadFile, status
+from fastapi.encoders import jsonable_encoder
+from fastapi.responses import FileResponse, HTMLResponse
+from fastapi.templating import Jinja2Templates
from models.documents_common import *
from models.documents_other import *
+from models.documents_request import *
+from models.documents_response import *
+from pydantic import ValidationError
+from repository.documents import doc_db
+from security.secure import get_current_active_user
from api.logging import LoggingRoute
diff --git a/src/opencdeserver/api/app/api/foundation.py b/src/opencdeserver/api/app/api/foundation.py
index 25c6036ac8..7d63eb749d 100644
--- a/src/opencdeserver/api/app/api/foundation.py
+++ b/src/opencdeserver/api/app/api/foundation.py
@@ -1,21 +1,16 @@
import os
-
from typing import Optional
-
-from fastapi import APIRouter, Request, Form
-from fastapi import Depends, HTTPException, status
-from fastapi.security import HTTPBasicCredentials, HTTPBasic
-from fastapi.responses import HTMLResponse
-from fastapi.templating import Jinja2Templates
-
-from models.request import *
-
-from repository.foundation import foundation_db
-from security.secure import authenticate_user, get_current_active_user
-
from uuid import uuid4
+
+from fastapi import APIRouter, Depends, Form, HTTPException, Request, status
+from fastapi.responses import HTMLResponse
+from fastapi.security import HTTPBasic, HTTPBasicCredentials
+from fastapi.templating import Jinja2Templates
+from models.request import *
+from repository.foundation import foundation_db
+from security.secure import authenticate_user, get_current_active_user, get_secrets
+
from api.logging import LoggingRoute
-from security.secure import get_secrets
secrets = get_secrets()
diff --git a/src/opencdeserver/api/app/api/logging.py b/src/opencdeserver/api/app/api/logging.py
index de368ccb9c..8d85cbf80b 100644
--- a/src/opencdeserver/api/app/api/logging.py
+++ b/src/opencdeserver/api/app/api/logging.py
@@ -1,11 +1,12 @@
-from fastapi import FastAPI, APIRouter, Response, Request
+import logging
+from collections.abc import Callable
+
+import httpx
+from fastapi import APIRouter, FastAPI, Request, Response
+from fastapi.routing import APIRoute
from starlette.background import BackgroundTask
from starlette.responses import StreamingResponse
-from fastapi.routing import APIRoute
from starlette.types import Message
-from collections.abc import Callable
-import logging
-import httpx
def log_info(req_body, res_body, route_url):
diff --git a/src/opencdeserver/api/app/api/user.py b/src/opencdeserver/api/app/api/user.py
index 5628a4cf05..def1a1573e 100644
--- a/src/opencdeserver/api/app/api/user.py
+++ b/src/opencdeserver/api/app/api/user.py
@@ -1,23 +1,19 @@
import collections
import os
-import traceback
import sys
-
-from fastapi import APIRouter, Request, Depends
-from fastapi.responses import FileResponse, HTMLResponse
-from fastapi.templating import Jinja2Templates
-from fastapi.encoders import jsonable_encoder
-
+import traceback
from uuid import UUID
-from pydantic import ValidationError
-from security.secure import get_current_active_user
-
-from repository.documents import doc_db
-
+from fastapi import APIRouter, Depends, Request
+from fastapi.encoders import jsonable_encoder
+from fastapi.responses import FileResponse, HTMLResponse
+from fastapi.templating import Jinja2Templates
+from models.documents_other import *
from models.documents_request import *
from models.documents_response import *
-from models.documents_other import *
+from pydantic import ValidationError
+from repository.documents import doc_db
+from security.secure import get_current_active_user
from api.logging import LoggingRoute
diff --git a/src/opencdeserver/api/app/database/neo4j.py b/src/opencdeserver/api/app/database/neo4j.py
index 9ad68759d2..ff8a4e7cde 100644
--- a/src/opencdeserver/api/app/database/neo4j.py
+++ b/src/opencdeserver/api/app/database/neo4j.py
@@ -1,15 +1,12 @@
-import jsonpickle
import os
-import pytz
-
-from dateutil import parser
-from uuid import uuid4, UUID
-
-from neo4j import GraphDatabase
-
from datetime import datetime, timezone
+from uuid import UUID, uuid4
+import jsonpickle
+import pytz
+from dateutil import parser
from models.request import UserInDB
+from neo4j import GraphDatabase
from security.secrets import get_secrets
get_secrets()
diff --git a/src/opencdeserver/api/app/ifcgraph/ifcgraph.py b/src/opencdeserver/api/app/ifcgraph/ifcgraph.py
index afe1c36749..e39878a286 100644
--- a/src/opencdeserver/api/app/ifcgraph/ifcgraph.py
+++ b/src/opencdeserver/api/app/ifcgraph/ifcgraph.py
@@ -18,11 +18,12 @@
# Some modifications have been made to the code.
#
-from py2neo.data import Node, Relationship
from uuid import uuid4
+
import ifcopenshell
import ifcopenshell.util.schema
from py2neo import Graph
+from py2neo.data import Node, Relationship
# Create the basic node with literal attributes and the class hierarchy
diff --git a/src/opencdeserver/api/app/main.py b/src/opencdeserver/api/app/main.py
index 4862106a55..2d189b8198 100644
--- a/src/opencdeserver/api/app/main.py
+++ b/src/opencdeserver/api/app/main.py
@@ -1,12 +1,9 @@
+from api import bcf, documents, foundation
from fastapi import FastAPI, Request
-from fastapi.responses import HTMLResponse, FileResponse
from fastapi.middleware.cors import CORSMiddleware
+from fastapi.responses import FileResponse, HTMLResponse
from fastapi.templating import Jinja2Templates
-from api import foundation
-from api import bcf
-from api import documents
-
endpoint_metadata = [
{"name": "api_versions_get", "description": "/foundation/versions"},
{"name": "foundation_auth_get", "description": "/foundation/1.0/auth"},
diff --git a/src/opencdeserver/api/app/models/bcf_common.py b/src/opencdeserver/api/app/models/bcf_common.py
index 30df15b565..d93d2c3dff 100644
--- a/src/opencdeserver/api/app/models/bcf_common.py
+++ b/src/opencdeserver/api/app/models/bcf_common.py
@@ -1,6 +1,7 @@
-from pydantic import BaseModel
-from typing import Optional
from enum import Enum
+from typing import Optional
+
+from pydantic import BaseModel
class BimSnippet(BaseModel):
diff --git a/src/opencdeserver/api/app/models/bcf_request.py b/src/opencdeserver/api/app/models/bcf_request.py
index 52fd9cad84..aa14bedd83 100644
--- a/src/opencdeserver/api/app/models/bcf_request.py
+++ b/src/opencdeserver/api/app/models/bcf_request.py
@@ -1,7 +1,21 @@
-from pydantic import BaseModel
from typing import Optional
-from models.bcf_common import BimSnippet, BitmapType, Location, Direction, SnapshotType, Component
-from models.bcf_common import Coloring, OrthogonalCamera, Visibility, PerspectiveCamera, Line, ClippingPlane
+
+from pydantic import BaseModel
+
+from models.bcf_common import (
+ BimSnippet,
+ BitmapType,
+ ClippingPlane,
+ Coloring,
+ Component,
+ Direction,
+ Line,
+ Location,
+ OrthogonalCamera,
+ PerspectiveCamera,
+ SnapshotType,
+ Visibility,
+)
class ProjectPUT(BaseModel):
diff --git a/src/opencdeserver/api/app/models/documents_common.py b/src/opencdeserver/api/app/models/documents_common.py
index 1e269babad..a32a3551be 100644
--- a/src/opencdeserver/api/app/models/documents_common.py
+++ b/src/opencdeserver/api/app/models/documents_common.py
@@ -1,6 +1,6 @@
-from pydantic import BaseModel, Field, constr
from typing import Optional
+from pydantic import BaseModel, Field, constr
# This file contains models used in both requests and responses during upload and download of documents.
diff --git a/src/opencdeserver/api/app/models/documents_not_used.py b/src/opencdeserver/api/app/models/documents_not_used.py
index e0c78ba09f..902eb23137 100644
--- a/src/opencdeserver/api/app/models/documents_not_used.py
+++ b/src/opencdeserver/api/app/models/documents_not_used.py
@@ -1,7 +1,8 @@
from typing import Optional
-from pydantic import BaseModel
-from models.documents_common import Document, DocumentVersion
+from pydantic import BaseModel
+
+from models.documents_common import Document, DocumentVersion
# This file contains models that are not used at all, at least not yet.
diff --git a/src/opencdeserver/api/app/models/documents_other.py b/src/opencdeserver/api/app/models/documents_other.py
index 9530268df7..253e5ecd80 100644
--- a/src/opencdeserver/api/app/models/documents_other.py
+++ b/src/opencdeserver/api/app/models/documents_other.py
@@ -1,10 +1,10 @@
-from pydantic import BaseModel, Field
from typing import Optional
-from models.documents_common import CallbackLink, Document
-from models.documents_request import FileToUpload, DocumentMetadataEntry
-from models.request import User
+from pydantic import BaseModel, Field
+from models.documents_common import CallbackLink, Document
+from models.documents_request import DocumentMetadataEntry, FileToUpload
+from models.request import User
# This file contains models that are neither used in requests nor in responses,
# and they can be used during both upload and download of documents.
diff --git a/src/opencdeserver/api/app/models/documents_request.py b/src/opencdeserver/api/app/models/documents_request.py
index 6eb9210a63..e58fe3af2a 100644
--- a/src/opencdeserver/api/app/models/documents_request.py
+++ b/src/opencdeserver/api/app/models/documents_request.py
@@ -1,10 +1,10 @@
-from pydantic import BaseModel, Field, constr
-from typing import Optional
from enum import Enum
+from typing import Optional
+
+from pydantic import BaseModel, Field, constr
from models.documents_common import CallbackLink
-
# This file contains models used in requests during upload and download of documents.
diff --git a/src/opencdeserver/api/app/models/documents_response.py b/src/opencdeserver/api/app/models/documents_response.py
index 2e98c70583..a2a53381ca 100644
--- a/src/opencdeserver/api/app/models/documents_response.py
+++ b/src/opencdeserver/api/app/models/documents_response.py
@@ -1,10 +1,10 @@
-from pydantic import BaseModel, Field, constr
-from typing import Optional
from enum import Enum
+from typing import Optional
+
+from pydantic import BaseModel, Field, constr
from models.documents_common import DocumentVersion, LinkData
-
# This file contains models used in responses during upload and download of documents.
diff --git a/src/opencdeserver/api/app/models/foundation_other.py b/src/opencdeserver/api/app/models/foundation_other.py
index 486a9b82f2..f6a894b5ad 100644
--- a/src/opencdeserver/api/app/models/foundation_other.py
+++ b/src/opencdeserver/api/app/models/foundation_other.py
@@ -1,4 +1,5 @@
from __future__ import annotations
+
from pydantic import BaseModel
diff --git a/src/opencdeserver/api/app/models/other.py b/src/opencdeserver/api/app/models/other.py
index c71593ce70..024db30398 100644
--- a/src/opencdeserver/api/app/models/other.py
+++ b/src/opencdeserver/api/app/models/other.py
@@ -1,4 +1,5 @@
from __future__ import annotations
+
from pydantic import BaseModel
diff --git a/src/opencdeserver/api/app/models/request.py b/src/opencdeserver/api/app/models/request.py
index 40271cf37a..616df5ef15 100644
--- a/src/opencdeserver/api/app/models/request.py
+++ b/src/opencdeserver/api/app/models/request.py
@@ -1,4 +1,5 @@
from __future__ import annotations
+
from pydantic import BaseModel
diff --git a/src/opencdeserver/api/app/repository/bcf.py b/src/opencdeserver/api/app/repository/bcf.py
index 80f9d172a1..a65c43d115 100644
--- a/src/opencdeserver/api/app/repository/bcf.py
+++ b/src/opencdeserver/api/app/repository/bcf.py
@@ -1,13 +1,10 @@
import base64
import os
-import jsonpickle
-
-from fastapi import UploadFile, HTTPException
-
from uuid import UUID, uuid4
+import jsonpickle
from database.neo4j import MyDB, driver
-
+from fastapi import HTTPException, UploadFile
from models.bcf_request import *
from models.bcf_response import *
from models.request import *
diff --git a/src/opencdeserver/api/app/repository/documents.py b/src/opencdeserver/api/app/repository/documents.py
index 39f5576065..95c669a7bc 100644
--- a/src/opencdeserver/api/app/repository/documents.py
+++ b/src/opencdeserver/api/app/repository/documents.py
@@ -1,22 +1,17 @@
-import os
import math
-
-from uuid import UUID, uuid4
+import os
from typing import Union
-
-from fastapi import HTTPException
-
-from database.neo4j import MyDB, driver
-
-from models.documents_request import *
-from models.documents_response import *
-from models.documents_common import *
-from models.documents_other import *
+from uuid import UUID, uuid4
import ifcopenshell
-from py2neo import Graph
-
+from database.neo4j import MyDB, driver
+from fastapi import HTTPException
from ifcgraph.ifcgraph import create_full_graph
+from models.documents_common import *
+from models.documents_other import *
+from models.documents_request import *
+from models.documents_response import *
+from py2neo import Graph
class DOCDB(MyDB):
diff --git a/src/opencdeserver/api/app/repository/foundation.py b/src/opencdeserver/api/app/repository/foundation.py
index 2554bfee8d..d80dc78c24 100644
--- a/src/opencdeserver/api/app/repository/foundation.py
+++ b/src/opencdeserver/api/app/repository/foundation.py
@@ -1,19 +1,14 @@
-import os
import hashlib
-
+import os
from datetime import timedelta
-from fastapi import HTTPException
-
from database.neo4j import MyDB, driver
-from security.secure import create_access_token
+from fastapi import HTTPException
from jose import jwt
-
-from security.secrets import get_secrets
-from security.secure import credentials_exception
-
from models.foundation_other import *
from models.other import *
+from security.secrets import get_secrets
+from security.secure import create_access_token, credentials_exception
secrets = get_secrets()
diff --git a/src/opencdeserver/api/app/security/secure.py b/src/opencdeserver/api/app/security/secure.py
index 77c225ee24..fec837b868 100644
--- a/src/opencdeserver/api/app/security/secure.py
+++ b/src/opencdeserver/api/app/security/secure.py
@@ -1,17 +1,15 @@
from __future__ import annotations
-from fastapi import Depends, HTTPException, status, Security
-from fastapi.security import OAuth2AuthorizationCodeBearer, SecurityScopes
+import os
from datetime import datetime, timedelta
-from passlib.context import CryptContext
-from jose import jwt, JWTError
-
-from models.other import TokenData
-from models.request import User
from database.neo4j import db
-import os
-
+from fastapi import Depends, HTTPException, Security, status
+from fastapi.security import OAuth2AuthorizationCodeBearer, SecurityScopes
+from jose import JWTError, jwt
+from models.other import TokenData
+from models.request import User
+from passlib.context import CryptContext
from security.secrets import get_secrets
secrets = get_secrets()
diff --git a/src/pyodide/demo-app/context.py b/src/pyodide/demo-app/context.py
index 8cece9ef68..f330c21940 100644
--- a/src/pyodide/demo-app/context.py
+++ b/src/pyodide/demo-app/context.py
@@ -1,4 +1,5 @@
import ifcopenshell
+import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.context
import ifcopenshell.api.feature
@@ -8,12 +9,9 @@ import ifcopenshell.api.spatial
import ifcopenshell.api.type
import ifcopenshell.api.unit
import ifcopenshell.geom
-import ifcopenshell.api
import ifcopenshell.util.representation
import ifcopenshell.util.unit
-
import numpy as np
-
import propertygroups
O = 0.0, 0.0, 0.0
diff --git a/src/pyodide/demo-app/tests/missing_files.py b/src/pyodide/demo-app/tests/missing_files.py
index ab603fa09e..87f7cbdbf8 100644
--- a/src/pyodide/demo-app/tests/missing_files.py
+++ b/src/pyodide/demo-app/tests/missing_files.py
@@ -1,6 +1,6 @@
async def test_pset():
- import ifcopenshell.api.pset
import ifcopenshell.api.material
+ import ifcopenshell.api.pset
errors = []
try:
diff --git a/test/bpy.py b/test/bpy.py
index 44389c36b7..b706c23e58 100644
--- a/test/bpy.py
+++ b/test/bpy.py
@@ -24,16 +24,20 @@
###############################################################################
import os
-import bpy
import sys
import time
-try: from io_import_scene_ifc import import_ifc
-except:
+
+import bpy
+
+try:
+ from io_import_scene_ifc import import_ifc
+except:
print("[Error] Unable to import IfcOpenShell")
sys.exit(1)
-from mathutils import Vector as V
from math import radians
+from mathutils import Vector as V
+
scn = bpy.context.scene
for ob in bpy.data.objects:
@@ -49,8 +53,8 @@ if not succes:
sys.exit(1)
dt = time.time()-t1
-print ("[Notice] Conversion took %.2f seconds"%dt)
-
+print ("[Notice] Conversion took %.2f seconds"%dt)
+
cam = bpy.data.cameras.new('cam')
cam.angle = radians(45)
cam_ob = bpy.data.objects.new('cam',cam)
@@ -72,7 +76,7 @@ def material(name,settings):
if not m: return
for k,v in settings.items():
setattr(m,k,v)
-
+
material("IfcWall",{"diffuse_color":[1,1,1],"diffuse_intensity":1})
material("IfcWallStandardCase",{"diffuse_color":[1,1,1],"diffuse_intensity":1})
material("IfcSite",{"diffuse_color":[0.4,0.5,0.25]})
diff --git a/test/run.py b/test/run.py
index 102529d9f9..320b8decc4 100644
--- a/test/run.py
+++ b/test/run.py
@@ -26,13 +26,13 @@
# #
###############################################################################
-import os
-import sys
-import shutil
import inspect
+import os
+import shutil
import subprocess
-from zipfile import ZipFile
+import sys
from urllib.request import urlretrieve
+from zipfile import ZipFile
# Test whether Blender and IfcOpenShell are installed
if subprocess.call(['blender','-b','-P','bpy.py','TEST']) != 0: