Sort imports

This commit is contained in:
Andrej730
2025-12-19 18:53:04 +05:00
parent 29176330e8
commit 13be6ccd45
731 changed files with 2234 additions and 1709 deletions
+8 -6
View File
@@ -17,19 +17,21 @@
# along with Ifc5D. If not, see <http://www.gnu.org/licenses/>.
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
+3 -3
View File
@@ -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]
+14 -10
View File
@@ -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,
+9 -8
View File
@@ -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] = {}
+6 -5
View File
@@ -16,17 +16,18 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import 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: