mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 19:12:31 +00:00
Fix openbot build
This commit is contained in:
@@ -7,11 +7,8 @@ try:
|
|||||||
from .entity_instance import entity_instance
|
from .entity_instance import entity_instance
|
||||||
|
|
||||||
from lark import Lark, Transformer
|
from lark import Lark, Transformer
|
||||||
except ImportError as e:
|
|
||||||
print(f"No stream support: {e}")
|
|
||||||
|
|
||||||
|
class StreamTransformer(Transformer):
|
||||||
class StreamTransformer(Transformer):
|
|
||||||
def string(self, items):
|
def string(self, items):
|
||||||
return str(items[0])[1:-1]
|
return str(items[0])[1:-1]
|
||||||
|
|
||||||
@@ -65,7 +62,7 @@ class StreamTransformer(Transformer):
|
|||||||
return (int(items[0]), str(items[1]), items[2])
|
return (int(items[0]), str(items[1]), items[2])
|
||||||
|
|
||||||
|
|
||||||
class stream(file):
|
class stream(file):
|
||||||
def __init__(self, filepath):
|
def __init__(self, filepath):
|
||||||
self.wrapped_data = None
|
self.wrapped_data = None
|
||||||
self.history_size = 64
|
self.history_size = 64
|
||||||
@@ -262,7 +259,7 @@ class stream(file):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
class stream_entity(entity_instance):
|
class stream_entity(entity_instance):
|
||||||
def __init__(self, id, ifc_class, file=None):
|
def __init__(self, id, ifc_class, file=None):
|
||||||
if not ifc_class:
|
if not ifc_class:
|
||||||
print(id, ifc_class, file)
|
print(id, ifc_class, file)
|
||||||
@@ -367,7 +364,7 @@ class stream_entity(entity_instance):
|
|||||||
return info
|
return info
|
||||||
|
|
||||||
|
|
||||||
class stream_wrapper:
|
class stream_wrapper:
|
||||||
def __init__(self, id, ifc_class, file):
|
def __init__(self, id, ifc_class, file):
|
||||||
self.id = id
|
self.id = id
|
||||||
self.ifc_class = ifc_class
|
self.ifc_class = ifc_class
|
||||||
@@ -379,3 +376,6 @@ class stream_wrapper:
|
|||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "todo"
|
return "todo"
|
||||||
|
|
||||||
|
except ImportError as e:
|
||||||
|
print(f"No stream support: {e}")
|
||||||
|
|||||||
Reference in New Issue
Block a user