mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Fix ruff complaints
This commit is contained in:
@@ -11,7 +11,6 @@ import tempfile
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
SCHEMA_ORDER = {
|
||||
"ifc2x3": 0,
|
||||
"ifc4": 1,
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
from collections import defaultdict
|
||||
from collections.abc import Iterable
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
|
||||
import bpy
|
||||
import ifcopenshell
|
||||
import ifcopenshell.api.style
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
project = "Bonsai Viewer"
|
||||
copyright = f"2020-{datetime.now().year} IfcOpenShell Contributors"
|
||||
author = "IfcOpenShell Contributors"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
)
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -29,7 +29,6 @@ try:
|
||||
import ifcopenshell.util.schema
|
||||
|
||||
from . import ifcopenshell_wrapper
|
||||
from . import entity_instance
|
||||
from . import file
|
||||
|
||||
class StreamTransformer(Transformer):
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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"}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user