mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 13:28:19 +00:00
Sort out imports
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
@@ -39,7 +40,6 @@ from typing import (
|
|||||||
|
|
||||||
import bmesh
|
import bmesh
|
||||||
import bpy
|
import bpy
|
||||||
import logging
|
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
import ifcopenshell.api.document
|
import ifcopenshell.api.document
|
||||||
import ifcopenshell.api.pset
|
import ifcopenshell.api.pset
|
||||||
@@ -58,9 +58,9 @@ from bpy_extras.io_utils import ImportHelper
|
|||||||
from lxml import etree
|
from lxml import etree
|
||||||
from mathutils import Color, Vector
|
from mathutils import Color, Vector
|
||||||
|
|
||||||
import bonsai.bim.import_ifc
|
|
||||||
import bonsai.bim.export_ifc
|
import bonsai.bim.export_ifc
|
||||||
import bonsai.bim.handler
|
import bonsai.bim.handler
|
||||||
|
import bonsai.bim.import_ifc
|
||||||
import bonsai.bim.module.drawing.sheeter as sheeter
|
import bonsai.bim.module.drawing.sheeter as sheeter
|
||||||
import bonsai.bim.module.drawing.svgwriter as svgwriter
|
import bonsai.bim.module.drawing.svgwriter as svgwriter
|
||||||
import bonsai.core.drawing as core
|
import bonsai.core.drawing as core
|
||||||
|
|||||||
@@ -56,14 +56,6 @@ import bonsai.core.project as core
|
|||||||
import bonsai.tool as tool
|
import bonsai.tool as tool
|
||||||
from bonsai.bim import export_ifc, import_ifc
|
from bonsai.bim import export_ifc, import_ifc
|
||||||
from bonsai.bim.ifc import IfcStore
|
from bonsai.bim.ifc import IfcStore
|
||||||
from bonsai.bim.ui import IFCFileSelector
|
|
||||||
from bonsai.bim import import_ifc
|
|
||||||
from bonsai.bim import export_ifc
|
|
||||||
from math import radians
|
|
||||||
from pathlib import Path
|
|
||||||
from collections import defaultdict
|
|
||||||
from mathutils import Vector, Matrix
|
|
||||||
from bpy.app.handlers import persistent
|
|
||||||
from bonsai.bim.module.model.decorator import FaceAreaDecorator, PolylineDecorator
|
from bonsai.bim.module.model.decorator import FaceAreaDecorator, PolylineDecorator
|
||||||
from bonsai.bim.module.model.polyline import PolylineOperator
|
from bonsai.bim.module.model.polyline import PolylineOperator
|
||||||
from bonsai.bim.module.project.data import LinksData, ProjectLibraryData
|
from bonsai.bim.module.project.data import LinksData, ProjectLibraryData
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import bonsai.tool as tool
|
|||||||
from bonsai.bim.helper import draw_attributes, prop_with_search
|
from bonsai.bim.helper import draw_attributes, prop_with_search
|
||||||
from bonsai.bim.ifc import IfcStore
|
from bonsai.bim.ifc import IfcStore
|
||||||
from bonsai.bim.module.project.data import LinksData, ProjectData
|
from bonsai.bim.module.project.data import LinksData, ProjectData
|
||||||
from typing import TYPE_CHECKING
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from bonsai.bim.module.project.prop import (
|
from bonsai.bim.module.project.prop import (
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Optional, Union
|
from typing import TYPE_CHECKING, Literal, Optional, Union
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
import bpy
|
import bpy
|
||||||
|
|||||||
@@ -18,10 +18,9 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import numpy as np
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from math import radians
|
from math import radians
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -32,6 +31,7 @@ import ifcopenshell
|
|||||||
import ifcopenshell.api.document
|
import ifcopenshell.api.document
|
||||||
import ifcopenshell.util.element
|
import ifcopenshell.util.element
|
||||||
import ifcopenshell.util.representation
|
import ifcopenshell.util.representation
|
||||||
|
import numpy as np
|
||||||
from ifcopenshell.api.project.append_asset import APPENDABLE_ASSET_TYPES
|
from ifcopenshell.api.project.append_asset import APPENDABLE_ASSET_TYPES
|
||||||
|
|
||||||
import bonsai.bim.schema
|
import bonsai.bim.schema
|
||||||
|
|||||||
@@ -38,6 +38,12 @@ exclude = ["test*"]
|
|||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
extend = "../../pyproject.toml"
|
extend = "../../pyproject.toml"
|
||||||
lint.select = [
|
lint.extend-select = [
|
||||||
"F401", # unused imports
|
"F401", # unused imports
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.ruff.lint.isort]
|
||||||
|
known-first-party = [
|
||||||
|
"test",
|
||||||
|
"bonsai",
|
||||||
|
]
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import tempfile
|
||||||
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
@@ -24,10 +26,8 @@ import pytest
|
|||||||
|
|
||||||
import bonsai.core.tool
|
import bonsai.core.tool
|
||||||
import bonsai.tool as tool
|
import bonsai.tool as tool
|
||||||
import tempfile
|
|
||||||
from bonsai.tool.blender import Blender as subject
|
from bonsai.tool.blender import Blender as subject
|
||||||
from test.bim.bootstrap import NewFile
|
from test.bim.bootstrap import NewFile
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
import bpy.stub_internal.rna_enums as rna_enums
|
import bpy.stub_internal.rna_enums as rna_enums
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import xml.etree.ElementTree as ET
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
import pytest
|
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
import ifcopenshell.api.drawing
|
import ifcopenshell.api.drawing
|
||||||
import ifcopenshell.api.group
|
import ifcopenshell.api.group
|
||||||
@@ -31,8 +30,9 @@ import ifcopenshell.guid
|
|||||||
import ifcopenshell.util.element
|
import ifcopenshell.util.element
|
||||||
import mathutils
|
import mathutils
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from mathutils import Vector
|
import pytest
|
||||||
from ifcopenshell.util.shape_builder import ShapeBuilder
|
from ifcopenshell.util.shape_builder import ShapeBuilder
|
||||||
|
from mathutils import Vector
|
||||||
|
|
||||||
import bonsai.core.tool
|
import bonsai.core.tool
|
||||||
import bonsai.tool as tool
|
import bonsai.tool as tool
|
||||||
|
|||||||
@@ -16,10 +16,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import json
|
|
||||||
import contextlib
|
import contextlib
|
||||||
|
import json
|
||||||
import tempfile
|
import tempfile
|
||||||
import numpy as np
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tempfile import NamedTemporaryFile
|
from tempfile import NamedTemporaryFile
|
||||||
|
|
||||||
@@ -30,6 +29,7 @@ import ifcopenshell.api.document
|
|||||||
import ifcopenshell.api.root
|
import ifcopenshell.api.root
|
||||||
import ifcopenshell.api.unit
|
import ifcopenshell.api.unit
|
||||||
import ifcpatch
|
import ifcpatch
|
||||||
|
import numpy as np
|
||||||
from ifcpatch.recipes import Ifc2Sql
|
from ifcpatch.recipes import Ifc2Sql
|
||||||
|
|
||||||
import bonsai.core.tool
|
import bonsai.core.tool
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
import math
|
import math
|
||||||
from decimal import ROUND_HALF_UP, Decimal
|
from decimal import ROUND_HALF_UP, Decimal
|
||||||
from typing import NamedTuple, Optional, Union, Any
|
from typing import Any, NamedTuple, Optional, Union
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import ifcopenshell.util.geolocation
|
|||||||
import ifcopenshell.util.unit
|
import ifcopenshell.util.unit
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
import ifcpatch
|
||||||
from ifcpatch.recipes.SetFalseOrigin import Patcher as SetFalseOrigin
|
from ifcpatch.recipes.SetFalseOrigin import Patcher as SetFalseOrigin
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user