Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Licini committed Mar 10, 2023
1 parent a61f7bc commit 24d9167
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/compas_ifc/entities/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, entity: ifcopenshell.entity_instance, model):
self._ifc_type = "Ifc" + type(self).__name__ # NOTE: this is a bit fragile
# self._declaration = self.model.schema.declaration_by_name(self._ifc_type)
self._declaration = None

def __repr__(self):
return "<{}:{}>".format(type(self).__name__, self._ifc_type)

Expand Down
4 changes: 3 additions & 1 deletion src/compas_ifc/resources/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def create_IfcAxis2Placement3D(file, point=None, dir1=None, dir2=None):
return axis2placement


def create_IfcShapeRepresentation(file: ifcopenshell.file, item: ifcopenshell.entity_instance, context: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance:
def create_IfcShapeRepresentation(
file: ifcopenshell.file, item: ifcopenshell.entity_instance, context: ifcopenshell.entity_instance
) -> ifcopenshell.entity_instance:
"""
Create an IFC Shape Representation from an IFC item and a context.
"""
Expand Down
12 changes: 9 additions & 3 deletions src/compas_ifc/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ def default_body_context(self):
def default_project(self):
if not self._default_project:
if not self.model.projects:
self._default_project = run("root.create_entity", self.file, ifc_class="IfcProject", name="Default Project")
self._default_project = run(
"root.create_entity", self.file, ifc_class="IfcProject", name="Default Project"
)
else:
self._default_project = self.write_entity(self.model.projects[0])
return self._default_project
Expand All @@ -95,7 +97,9 @@ def default_site(self):
def default_building(self):
if not self._default_building:
if not self.model.buildings:
self._default_building = run("root.create_entity", self.file, ifc_class="IfcBuilding", name="Default Building")
self._default_building = run(
"root.create_entity", self.file, ifc_class="IfcBuilding", name="Default Building"
)
run(
"aggregate.assign_object",
self.file,
Expand All @@ -110,7 +114,9 @@ def default_building(self):
def default_building_storey(self):
if not self._default_building_storey:
if not self.model.building_storeys:
self._default_building_storey = run("root.create_entity", self.file, ifc_class="IfcBuildingStorey", name="Default Storey")
self._default_building_storey = run(
"root.create_entity", self.file, ifc_class="IfcBuildingStorey", name="Default Storey"
)
run(
"aggregate.assign_object",
self.file,
Expand Down

0 comments on commit 24d9167

Please sign in to comment.