mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Python import fixes: import from wrapper now which inherits from mixins
This commit is contained in:
@@ -91,9 +91,8 @@ except Exception:
|
||||
# `_file`, `_stream` is used only for annotations inside this file,
|
||||
# see https://github.com/microsoft/pyright/discussions/9065.
|
||||
from . import guid
|
||||
from .entity_instance import entity_instance
|
||||
from .file import file, rocksdb_lazy_instance
|
||||
from .file import file as _file
|
||||
from .ifcopenshell_wrapper import entity_instance, file
|
||||
from .file import rocksdb_lazy_instance
|
||||
from .sql import sqlite, sqlite_entity
|
||||
|
||||
# explicitly specify available imported symbols
|
||||
|
||||
@@ -35,7 +35,6 @@ import ifcopenshell
|
||||
from ifcopenshell.util.mvd_info import LARK_AVAILABLE, MvdInfo
|
||||
|
||||
from . import ifcopenshell_wrapper
|
||||
from .entity_instance import entity_instance
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import ifcopenshell.util.schema
|
||||
@@ -702,7 +701,7 @@ class file_mixin:
|
||||
else:
|
||||
raise AttributeError
|
||||
|
||||
def __getitem__(self, key: Union[numbers.Integral, str, bytes]) -> entity_instance:
|
||||
def __getitem__(self, key: Union[numbers.Integral, str, bytes]) -> ifcopenshell.entity_instance:
|
||||
if isinstance(key, numbers.Integral):
|
||||
return self.by_id(key)
|
||||
elif isinstance(key, (str, bytes)):
|
||||
|
||||
@@ -31,8 +31,7 @@ import ifcopenshell.util.attribute
|
||||
import ifcopenshell.util.schema
|
||||
|
||||
from . import ifcopenshell_wrapper
|
||||
from .entity_instance import entity_instance
|
||||
from .file import file
|
||||
from . import file, entity_instance
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import sqlite3
|
||||
|
||||
Reference in New Issue
Block a user