Run black, and add black to a "qa" target to make it a standardised process.

This commit is contained in:
Dion Moult
2021-09-09 21:27:23 +10:00
parent 95903c965d
commit 865c0f4895
305 changed files with 1968 additions and 1143 deletions
@@ -9,13 +9,16 @@ class Usecase:
self.settings[key] = value
def execute(self):
prop_template = self.file.create_entity("IfcSimplePropertyTemplate", **{
"GlobalId": ifcopenshell.guid.new(),
"Name": "NewProperty",
"PrimaryMeasureType": "IfcLabel",
"TemplateType": "P_SINGLEVALUE",
"AccessState": "READWRITE"
})
prop_template = self.file.create_entity(
"IfcSimplePropertyTemplate",
**{
"GlobalId": ifcopenshell.guid.new(),
"Name": "NewProperty",
"PrimaryMeasureType": "IfcLabel",
"TemplateType": "P_SINGLEVALUE",
"AccessState": "READWRITE",
}
)
has_property_templates = list(self.settings["pset_template"].HasPropertyTemplates or [])
has_property_templates.append(prop_template)
self.settings["pset_template"].HasPropertyTemplates = has_property_templates
@@ -9,9 +9,12 @@ class Usecase:
self.settings[key] = value
def execute(self):
self.file.create_entity("IfcPropertySetTemplate", **{
"GlobalId": ifcopenshell.guid.new(),
"Name": "New_Pset",
"TemplateType": "PSET_TYPEDRIVENONLY",
"ApplicableEntity": "IfcTypeObject"
})
self.file.create_entity(
"IfcPropertySetTemplate",
**{
"GlobalId": ifcopenshell.guid.new(),
"Name": "New_Pset",
"TemplateType": "PSET_TYPEDRIVENONLY",
"ApplicableEntity": "IfcTypeObject",
}
)
@@ -29,6 +29,6 @@ class Data:
"GlobalId": data["GlobalId"],
"Name": data["Name"],
"Description": data["Description"],
"PrimaryMeasureType": data["PrimaryMeasureType"]
"PrimaryMeasureType": data["PrimaryMeasureType"],
}
cls.is_loaded = True
@@ -4,9 +4,7 @@ import ifcopenshell.util.element
class Usecase:
def __init__(self, file, **settings):
self.file = file
self.settings = {
"prop_template": None
}
self.settings = {"prop_template": None}
for key, value in settings.items():
self.settings[key] = value
@@ -4,9 +4,7 @@ import ifcopenshell.util.element
class Usecase:
def __init__(self, file, **settings):
self.file = file
self.settings = {
"pset_template": None
}
self.settings = {"pset_template": None}
for key, value in settings.items():
self.settings[key] = value