mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
remove unused argument
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user