mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
black: Format incorrectly formated files (#7194)
This commit is contained in:
committed by
GitHub
parent
066326ab3b
commit
ab0a602f9f
+1
-1
@@ -345,7 +345,7 @@ if any(f.startswith("py-") for f in flags):
|
|||||||
PYTHON_VERSIONS = [pyv for pyv in PYTHON_VERSIONS if f"py-{''.join(pyv.split('.')[:2])}" in flags]
|
PYTHON_VERSIONS = [pyv for pyv in PYTHON_VERSIONS if f"py-{''.join(pyv.split('.')[:2])}" in flags]
|
||||||
|
|
||||||
if any(f.startswith("occt-") for f in flags):
|
if any(f.startswith("occt-") for f in flags):
|
||||||
OCCT_VERSION = next(f.split('-', 1)[1] for f in flags if f.startswith("occt-"))
|
OCCT_VERSION = next(f.split("-", 1)[1] for f in flags if f.startswith("occt-"))
|
||||||
|
|
||||||
print(OCCT_VERSION)
|
print(OCCT_VERSION)
|
||||||
|
|
||||||
|
|||||||
@@ -839,12 +839,12 @@ class SvgWriter:
|
|||||||
|
|
||||||
symbol = tool.Drawing.get_annotation_symbol(element)
|
symbol = tool.Drawing.get_annotation_symbol(element)
|
||||||
newline_at = tool.Drawing.get_newline_at(element)
|
newline_at = tool.Drawing.get_newline_at(element)
|
||||||
|
|
||||||
# Get reverse_list and list_separator from EPset_Annotation
|
# Get reverse_list and list_separator from EPset_Annotation
|
||||||
pset_data = ifcopenshell.util.element.get_pset(element, "EPset_Annotation") or {}
|
pset_data = ifcopenshell.util.element.get_pset(element, "EPset_Annotation") or {}
|
||||||
reverse_list = pset_data.get("Reverse_List", False)
|
reverse_list = pset_data.get("Reverse_List", False)
|
||||||
list_separator = pset_data.get("List_Separator") or ", "
|
list_separator = pset_data.get("List_Separator") or ", "
|
||||||
|
|
||||||
template_text_fields = []
|
template_text_fields = []
|
||||||
if symbol:
|
if symbol:
|
||||||
symbol_transform = self.get_symbol_transform(text_position_svg_str, angle, text_obj)
|
symbol_transform = self.get_symbol_transform(text_position_svg_str, angle, text_obj)
|
||||||
|
|||||||
@@ -1242,12 +1242,12 @@ class Drawing(bonsai.core.tool.Drawing):
|
|||||||
props = cls.get_text_props(obj)
|
props = cls.get_text_props(obj)
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
assert element
|
assert element
|
||||||
|
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
pset = tool.Pset.get_element_pset(element, "EPset_Annotation")
|
pset = tool.Pset.get_element_pset(element, "EPset_Annotation")
|
||||||
if not pset:
|
if not pset:
|
||||||
pset = ifcopenshell.api.pset.add_pset(ifc_file, product=element, name="EPset_Annotation")
|
pset = ifcopenshell.api.pset.add_pset(ifc_file, product=element, name="EPset_Annotation")
|
||||||
|
|
||||||
ifcopenshell.api.pset.edit_pset(
|
ifcopenshell.api.pset.edit_pset(
|
||||||
ifc_file,
|
ifc_file,
|
||||||
pset=pset,
|
pset=pset,
|
||||||
@@ -1259,7 +1259,6 @@ class Drawing(bonsai.core.tool.Drawing):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# TODO below this point is highly experimental prototype code with no tests
|
# TODO below this point is highly experimental prototype code with no tests
|
||||||
|
|
||||||
class SheetWarningType(NamedTuple):
|
class SheetWarningType(NamedTuple):
|
||||||
@@ -1841,17 +1840,17 @@ class Drawing(bonsai.core.tool.Drawing):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def replace_text_literal_variables(
|
def replace_text_literal_variables(
|
||||||
cls,
|
cls,
|
||||||
text: str,
|
text: str,
|
||||||
product: Optional[ifcopenshell.entity_instance] = None,
|
product: Optional[ifcopenshell.entity_instance] = None,
|
||||||
reverse_list: bool = False,
|
reverse_list: bool = False,
|
||||||
list_separator: str = ", "
|
list_separator: str = ", ",
|
||||||
) -> str:
|
) -> str:
|
||||||
if not product:
|
if not product:
|
||||||
return text
|
return text
|
||||||
if list_separator:
|
if list_separator:
|
||||||
list_separator = list_separator.encode().decode('unicode_escape')
|
list_separator = list_separator.encode().decode("unicode_escape")
|
||||||
|
|
||||||
for command in re.findall("``.*?``", text):
|
for command in re.findall("``.*?``", text):
|
||||||
original_command = command
|
original_command = command
|
||||||
for variable in re.findall("{{.*?}}", command):
|
for variable in re.findall("{{.*?}}", command):
|
||||||
|
|||||||
Reference in New Issue
Block a user