remove unused argument

This commit is contained in:
Andrej730
2024-06-14 16:58:36 +05:00
parent f3f1e8721c
commit 1f7d80e6f1
3 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ def add_style(ifc: tool.Ifc, style: tool.Style, obj: bpy.types.Material) -> ifco
material = ifc.get_entity(obj)
if material:
ifc.run("style.assign_material_style", material=material, style=element, context=style.get_context(obj))
ifc.run("style.assign_material_style", material=material, style=element, context=style.get_context())
return element
+1 -2
View File
@@ -95,9 +95,8 @@ class Style(blenderbim.core.tool.Style):
def get_active_style_type(cls) -> str:
return bpy.context.scene.BIMStylesProperties.style_type
# TODO: `obj` argument is unused?
@classmethod
def get_context(cls, obj) -> Union[ifcopenshell.entity_instance, None]:
def get_context(cls) -> Union[ifcopenshell.entity_instance, None]:
return ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Body", "MODEL_VIEW")
@classmethod
+1 -1
View File
@@ -95,7 +95,7 @@ class TestGetContext(NewFile):
def test_run(self):
bpy.ops.bim.create_project()
context = ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Body", "MODEL_VIEW")
assert subject.get_context("obj") == context
assert subject.get_context() == context
class TestGetElementsByStyle(NewFile):