bonsai - sort imports

This commit is contained in:
Andrej730
2026-01-26 17:11:12 +05:00
parent 1319391a6b
commit 953c5fddc6
524 changed files with 3338 additions and 2344 deletions
+2 -1
View File
@@ -24,10 +24,11 @@ import ifcopenshell.api.root
import ifcopenshell.api.spatial
import ifcopenshell.api.unit
import ifcopenshell.util.shape_builder
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.aggregate import Aggregate as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+5 -3
View File
@@ -16,14 +16,16 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING
import bpy
import ifcopenshell
import pytest
import bonsai.core.tool
import bonsai.tool as tool
import pytest
from test.bim.bootstrap import NewFile
from typing import TYPE_CHECKING
from bonsai.tool.blender import Blender as subject
from test.bim.bootstrap import NewFile
if TYPE_CHECKING:
import bpy.stub_internal.rna_enums as rna_enums
+6 -4
View File
@@ -17,22 +17,24 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import brickschema
import brickschema.persistent
from brickschema.namespaces import REF, A
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.aggregate
import ifcopenshell.api.root
import ifcopenshell.guid
from brickschema.namespaces import REF, A
from rdflib import Literal, Namespace, URIRef
from rdflib.namespace import RDF
import bonsai.core.tool
import bonsai.tool as tool
from rdflib.namespace import RDF
from rdflib import Literal, URIRef, Namespace
from test.bim.bootstrap import NewFile
from bonsai.tool.brick import Brick as subject
from bonsai.tool.brick import BrickStore
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+3 -2
View File
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from test.bim.bootstrap import NewFile
from bonsai.tool.cad import Cad as subject
from mathutils import Vector
from bonsai.tool.cad import Cad as subject
from test.bim.bootstrap import NewFile
V = lambda *x: Vector([float(i) for i in x])
+3 -1
View File
@@ -17,14 +17,16 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import ifcopenshell
import ifcopenshell.util.classification
import ifcopenshell.util.element
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.classification import Classification as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+1
View File
@@ -24,6 +24,7 @@ import ifcopenshell.api.feature
import ifcopenshell.api.group
import ifcopenshell.api.spatial
import ifcopenshell.util.element
import bonsai.core.tool
import bonsai.tool as tool
from bonsai.tool.collector import Collector as subject
+2 -1
View File
@@ -18,9 +18,10 @@
import bpy
import ifcopenshell
import test.bim.bootstrap
import bonsai.core.tool
import bonsai.tool as tool
import test.bim.bootstrap
from bonsai.tool.context import Context as subject
+5 -3
View File
@@ -17,16 +17,18 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
from pathlib import Path
import bpy
import ifcopenshell
import ifcopenshell.api.style
import ifcopenshell.util.schema
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.debug import Debug as subject
from bonsai.bim.ifc import IfcStore
from pathlib import Path
from bonsai.tool.debug import Debug as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+4 -2
View File
@@ -16,15 +16,17 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import json
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.document
import bonsai.core.tool
import bonsai.tool as tool
import json
from test.bim.bootstrap import NewFile
from bonsai.tool.document import Document as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+9 -8
View File
@@ -17,10 +17,10 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import xml.etree.ElementTree as ET
from pathlib import Path
import numpy as np
import bpy
import mathutils
import ifcopenshell
import ifcopenshell.api.drawing
import ifcopenshell.api.group
@@ -28,14 +28,15 @@ import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.guid
import ifcopenshell.util.element
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.drawing import Drawing as subject
from bonsai.bim.module.drawing.data import DecoratorData
import mathutils
import numpy as np
from mathutils import Vector
import xml.etree.ElementTree as ET
import bonsai.core.tool
import bonsai.tool as tool
from bonsai.bim.module.drawing.data import DecoratorData
from bonsai.tool.drawing import Drawing as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+7 -5
View File
@@ -16,19 +16,21 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import math
import numpy as np
from typing import Union
import bpy
import ifcopenshell
import ifcopenshell.api.geometry
import ifcopenshell.api.root
import ifcopenshell.api.type
import numpy as np
from mathutils import Vector
import bonsai.core.tool
import bonsai.tool as tool
from mathutils import Vector
from test.bim.bootstrap import NewFile
from bonsai.tool.geometry import Geometry as subject
from typing import Union
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+5 -3
View File
@@ -16,19 +16,21 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import math
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.context
import ifcopenshell.api.georeference
import ifcopenshell.api.root
import ifcopenshell.api.unit
from mathutils import Vector
import bonsai.core.tool
import bonsai.tool as tool
from mathutils import Vector
from test.bim.bootstrap import NewFile
from bonsai.tool.georeference import Georeference as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+7 -5
View File
@@ -16,15 +16,17 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import tempfile
from pathlib import Path
import bpy
import ifcopenshell
import test.bim.bootstrap
import pytest
import bonsai.core.tool
import bonsai.tool as tool
import pytest
import tempfile
import os
from pathlib import Path
import test.bim.bootstrap
from bonsai.tool.ifc import Ifc as subject
+2 -1
View File
@@ -18,10 +18,11 @@
import bpy
import ifcopenshell
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.library import Library as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+10 -8
View File
@@ -16,21 +16,23 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bmesh
import json
from pathlib import Path
import bmesh
import bpy
import ifcopenshell
import ifcopenshell.api.library
import ifcopenshell.api.style
import ifcopenshell.util.schema
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.loader import Loader as subject
import numpy as np
from ifcopenshell.util.shape_builder import ShapeBuilder
from mathutils import Vector
from pathlib import Path
import bonsai.core.tool
import bonsai.tool as tool
from bonsai.tool.loader import Loader as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
@@ -188,8 +190,8 @@ class TestCreatingStyles(NewFile):
def get_png_raster_code():
import base64
import zlib
import struct
import zlib
# https://blender.stackexchange.com/questions/62072/does-blender-have-a-method-to-a-get-png-formatted-bytearray-for-an-image-via-pyt
width = 2
+2 -1
View File
@@ -23,10 +23,11 @@ import ifcopenshell.api.material
import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.api.style
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.material import Material as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+5 -3
View File
@@ -16,16 +16,18 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import math
import numpy
import bpy
import ifcopenshell
import ifcopenshell.api.aggregate
import ifcopenshell.api.spatial
import ifcopenshell.api.unit
import test.bim.bootstrap
import numpy
import bonsai.core.tool
import bonsai.tool as tool
import test.bim.bootstrap
from bonsai.tool.misc import Misc as subject
+7 -5
View File
@@ -16,6 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import json
from typing import Any
import bpy
import ifcopenshell
import ifcopenshell.api.geometry
@@ -26,14 +29,13 @@ import ifcopenshell.api.type
import ifcopenshell.util.element
import ifcopenshell.util.representation
import ifcopenshell.util.shape_builder
import numpy as np
from ifcopenshell.util.shape_builder import ShapeBuilder, V
import bonsai.core.tool
import bonsai.tool as tool
import numpy as np
import json
from typing import Any
from test.bim.bootstrap import NewFile
from bonsai.tool.model import Model as subject
from ifcopenshell.util.shape_builder import V, ShapeBuilder
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+2 -1
View File
@@ -20,10 +20,11 @@ import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.spatial
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.nest import Nest as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+5 -3
View File
@@ -16,15 +16,17 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from functools import cache
from typing import Any
import bpy
import ifcopenshell
import ifcopenshell.api.owner
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.owner import Owner as subject
from typing import Any
from functools import cache
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+3 -1
View File
@@ -17,12 +17,14 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import ifcopenshell
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.patch import Patch as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+2 -1
View File
@@ -21,10 +21,11 @@ import ifcopenshell
import ifcopenshell.api.project
import ifcopenshell.api.root
import ifcopenshell.api.unit
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.polyline import Polyline as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+7 -5
View File
@@ -17,20 +17,22 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import contextlib
import tempfile
from pathlib import Path
import bpy
import ifcopenshell
import ifcopenshell.api.context
import ifcopenshell.api.document
import ifcopenshell.api.root
import ifcopenshell.api.unit
import bonsai.core.tool
import bonsai.tool as tool
import tempfile
import ifcpatch
from ifcpatch.recipes import Ifc2Sql
from test.bim.bootstrap import NewFile
import bonsai.core.tool
import bonsai.tool as tool
from bonsai.tool.project import Project as subject
from pathlib import Path
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+1
View File
@@ -20,6 +20,7 @@ import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.pset
import bonsai.core.tool
import bonsai.tool as tool
from bonsai.tool.pset import Pset as subject
@@ -20,6 +20,7 @@ import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.pset
import bonsai.core.tool
import bonsai.tool as tool
from bonsai.tool.pset_template import PsetTemplate as subject
+5 -4
View File
@@ -25,11 +25,12 @@ import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.util.pset
import test.bim.bootstrap
import bonsai.core.tool
import bonsai.core.root
import bonsai.tool as tool
import bonsai.bim.import_ifc as import_ifc
import bonsai.core.root
import bonsai.core.tool
import bonsai.tool as tool
import test.bim.bootstrap
from bonsai.tool.qto import Qto as subject
+2 -1
View File
@@ -22,10 +22,11 @@ import ifcopenshell.api
import ifcopenshell.api.feature
import ifcopenshell.api.type
import ifcopenshell.util.element
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.root import Root as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+3 -1
View File
@@ -17,15 +17,17 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.pset
import ifcopenshell.api.root
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.sequence import Sequence as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+3 -2
View File
@@ -16,17 +16,18 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import numpy as np
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.root
import ifcopenshell.api.spatial
import numpy as np
from mathutils import Matrix
import bonsai.core.tool
import bonsai.tool as tool
from bonsai.tool.spatial import Spatial as subject
from test.bim.bootstrap import NewFile
from mathutils import Matrix
class TestImplementsTool(NewFile):
+4 -2
View File
@@ -17,17 +17,19 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.root
import ifcopenshell.util.representation
import pytest
from ifcopenshell.util.shape_builder import ShapeBuilder
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.style import Style as subject
from ifcopenshell.util.shape_builder import ShapeBuilder
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+2 -2
View File
@@ -17,16 +17,16 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import numpy as np
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.util.geolocation
import numpy as np
import test.bim.bootstrap
import bonsai.core.tool
import bonsai.tool as tool
import test.bim.bootstrap
from bonsai.tool import Surveyor as subject
+6 -4
View File
@@ -16,19 +16,21 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from math import pi
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.root
import ifcopenshell.api.system
import ifcopenshell.util.unit
import numpy as np
from mathutils import Euler, Matrix, Vector
import bonsai.core.tool
import bonsai.tool as tool
import numpy as np
from test.bim.bootstrap import NewFile
from bonsai.tool.system import System as subject
from mathutils import Euler, Vector, Matrix
from math import pi
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+2 -1
View File
@@ -20,10 +20,11 @@ import bpy
import ifcopenshell
import ifcopenshell.api.root
import ifcopenshell.api.type
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.type import Type as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):
+2 -1
View File
@@ -21,10 +21,11 @@ import ifcopenshell
import ifcopenshell.api.project
import ifcopenshell.api.root
import ifcopenshell.api.unit
import bonsai.core.tool
import bonsai.tool as tool
from test.bim.bootstrap import NewFile
from bonsai.tool.unit import Unit as subject
from test.bim.bootstrap import NewFile
class TestImplementsTool(NewFile):