diff --git a/pyodide/order_pyodide_wheel_shared_objects.py b/pyodide/order_pyodide_wheel_shared_objects.py index cbe319b3e4..338d254df6 100644 --- a/pyodide/order_pyodide_wheel_shared_objects.py +++ b/pyodide/order_pyodide_wheel_shared_objects.py @@ -11,7 +11,6 @@ import tempfile import zipfile from pathlib import Path - SCHEMA_ORDER = { "ifc2x3": 0, "ifc4": 1, diff --git a/pyodide/split_pyodide_ifcopenshell_wheel.py b/pyodide/split_pyodide_ifcopenshell_wheel.py index 91108d3dab..f4f64dc704 100644 --- a/pyodide/split_pyodide_ifcopenshell_wheel.py +++ b/pyodide/split_pyodide_ifcopenshell_wheel.py @@ -16,7 +16,6 @@ import zipfile from email.parser import Parser from pathlib import Path - MAIN_SHARED_OBJECT_RE = re.compile(r"(^|/)_ifcopenshell_wrapper(?:\.|$)") PURE_PYTHON_PACKAGE_NAME = "ifcopenshell-pure-python" PURE_PYTHON_PREFIXES = ( @@ -132,14 +131,14 @@ def build_wheel( "License-File: COPYING\n" "License-File: COPYING.LESSER\n" "\n" - ).encode("utf-8") + ).encode() wheel = ( "Wheel-Version: 1.0\n" "Generator: split_pyodide_ifcopenshell_wheel.py\n" f"Root-Is-Purelib: {str(root_is_purelib).lower()}\n" f"Tag: {tag}\n" "\n" - ).encode("utf-8") + ).encode() with zipfile.ZipFile(out, "w", compression=zipfile.ZIP_DEFLATED, compresslevel=9) as zf: for info, data in payloads: diff --git a/src/bonsai/bonsai/bim/module/geometry/ui.py b/src/bonsai/bonsai/bim/module/geometry/ui.py index 02f9b3e3c7..68e3e0fa47 100644 --- a/src/bonsai/bonsai/bim/module/geometry/ui.py +++ b/src/bonsai/bonsai/bim/module/geometry/ui.py @@ -20,7 +20,6 @@ import bpy import ifcopenshell.util.unit from bpy.types import Menu, Panel, UIList -import ifcopenshell.util.unit import bonsai.bim import bonsai.tool as tool from bonsai.bim.helper import prop_with_search diff --git a/src/bonsai/bonsai/bim/module/model/ui.py b/src/bonsai/bonsai/bim/module/model/ui.py index 139739a65b..13b918e5fd 100644 --- a/src/bonsai/bonsai/bim/module/model/ui.py +++ b/src/bonsai/bonsai/bim/module/model/ui.py @@ -25,7 +25,6 @@ import bpy import ifcopenshell.util.unit from bpy.types import Panel -import ifcopenshell.util.unit import bonsai.bim import bonsai.tool as tool from bonsai.bim.helper import prop_with_search diff --git a/src/bonsai/bonsai/tool/debug.py b/src/bonsai/bonsai/tool/debug.py index 686367c3ab..58cd1b464f 100644 --- a/src/bonsai/bonsai/tool/debug.py +++ b/src/bonsai/bonsai/tool/debug.py @@ -19,7 +19,6 @@ from __future__ import annotations import json -import os import re from collections import defaultdict from collections.abc import Iterable diff --git a/src/bonsai/bonsai/tool/geometry.py b/src/bonsai/bonsai/tool/geometry.py index bf0c80c88d..5e07de2969 100644 --- a/src/bonsai/bonsai/tool/geometry.py +++ b/src/bonsai/bonsai/tool/geometry.py @@ -75,7 +75,7 @@ import bonsai.core.style import bonsai.core.system import bonsai.core.tool import bonsai.tool as tool -from bonsai.bim.ifc import IfcStore, get_cache_or_detect_lock +from bonsai.bim.ifc import get_cache_or_detect_lock if TYPE_CHECKING: from bonsai.bim.module.geometry.prop import ( diff --git a/src/bonsai/test/tool/test_debug.py b/src/bonsai/test/tool/test_debug.py index f69ff5444c..cef51c35b3 100644 --- a/src/bonsai/test/tool/test_debug.py +++ b/src/bonsai/test/tool/test_debug.py @@ -17,6 +17,7 @@ # along with Bonsai. If not, see . import os + import bpy import ifcopenshell import ifcopenshell.api.style diff --git a/src/bonsaiviewer-autodesk/packaging/build.py b/src/bonsaiviewer-autodesk/packaging/build.py index 0f461ff038..6e53bf1ade 100644 --- a/src/bonsaiviewer-autodesk/packaging/build.py +++ b/src/bonsaiviewer-autodesk/packaging/build.py @@ -28,7 +28,6 @@ import subprocess import zipfile from pathlib import Path - PROJECT_ROOT = Path(__file__).resolve().parent.parent DIST_DIR = PROJECT_ROOT / "dist" TARGET_DIR = PROJECT_ROOT / "target" / "release" diff --git a/src/bonsaiviewer/docs/conf.py b/src/bonsaiviewer/docs/conf.py index 7585dd2d87..3bc934e210 100644 --- a/src/bonsaiviewer/docs/conf.py +++ b/src/bonsaiviewer/docs/conf.py @@ -3,7 +3,6 @@ import os from datetime import datetime - project = "Bonsai Viewer" copyright = f"2020-{datetime.now().year} IfcOpenShell Contributors" author = "IfcOpenShell Contributors" diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index 1faa839bb5..f55bcc444b 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -62,7 +62,7 @@ import tempfile import zipfile from collections.abc import Generator, Sequence from pathlib import Path -from typing import TYPE_CHECKING, Any, Literal, Optional, Union, overload +from typing import TYPE_CHECKING, Literal, Optional, Union, overload if TYPE_CHECKING: import ifcopenshell.express.schema_class diff --git a/src/ifcopenshell-python/ifcopenshell/entity_instance.py b/src/ifcopenshell-python/ifcopenshell/entity_instance.py index 6672a39542..dc0fd59abd 100644 --- a/src/ifcopenshell-python/ifcopenshell/entity_instance.py +++ b/src/ifcopenshell-python/ifcopenshell/entity_instance.py @@ -22,19 +22,15 @@ from __future__ import annotations import functools import importlib import itertools -import numbers import operator import subprocess import sys import time from collections.abc import Callable, Sequence -from typing import TYPE_CHECKING, Any, NoReturn, TypeVar, Union, cast, overload +from typing import Any, TypeVar, Union from . import ifcopenshell_wrapper, settings -if TYPE_CHECKING: - import ifcopenshell - try: import logging except ImportError: @@ -403,4 +399,4 @@ class entity_instance_mixin: return ifcopenshell_wrapper.get_info_cpp(self.wrapped_data, include_identifier) return self.get_info_py( include_identifier=include_identifier, recursive=recursive, return_type=return_type, ignore=ignore - ) \ No newline at end of file + ) diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py index 79da26cb41..10cc3240ef 100644 --- a/src/ifcopenshell-python/ifcopenshell/file.py +++ b/src/ifcopenshell-python/ifcopenshell/file.py @@ -22,8 +22,6 @@ import functools import numbers import os import re -import types -import weakref import zipfile from collections.abc import Callable, Generator from pathlib import Path diff --git a/src/ifcopenshell-python/ifcopenshell/stream.py b/src/ifcopenshell-python/ifcopenshell/stream.py index 3b9e8bfe42..b12a9a2248 100644 --- a/src/ifcopenshell-python/ifcopenshell/stream.py +++ b/src/ifcopenshell-python/ifcopenshell/stream.py @@ -29,7 +29,6 @@ try: import ifcopenshell.util.schema from . import ifcopenshell_wrapper - from . import entity_instance from . import file class StreamTransformer(Transformer): diff --git a/src/wrappergen/clang_frontend.py b/src/wrappergen/clang_frontend.py index 351bcd91bd..8962e588aa 100644 --- a/src/wrappergen/clang_frontend.py +++ b/src/wrappergen/clang_frontend.py @@ -18,7 +18,14 @@ from .conventions import ( sequence_adapter_name, strip_pointer, ) -from .model import CallableModel, ClassModel, EnumModel, EnumValueModel, ModuleModel, ParameterModel +from .model import ( + CallableModel, + ClassModel, + EnumModel, + EnumValueModel, + ModuleModel, + ParameterModel, +) def _require_clang(): diff --git a/src/wrappergen/conventions.py b/src/wrappergen/conventions.py index 401c329daa..68fcc24744 100644 --- a/src/wrappergen/conventions.py +++ b/src/wrappergen/conventions.py @@ -3,7 +3,6 @@ from __future__ import annotations import keyword import re - INTEGER_CPP_TYPES = {"int", "size_t", "std::size_t", "unsigned int", "uint32_t"} diff --git a/src/wrappergen/generated/ifcopenshell_experimental.py b/src/wrappergen/generated/ifcopenshell_experimental.py index 6c187b3f70..8d5d76c054 100644 --- a/src/wrappergen/generated/ifcopenshell_experimental.py +++ b/src/wrappergen/generated/ifcopenshell_experimental.py @@ -4,6 +4,7 @@ from enum import IntEnum import _ifcopenshell_experimental as _native + class FileType(IntEnum): FT_IFCSPF = _native.FT_IFCSPF FT_IFCXML = _native.FT_IFCXML