mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Run black, and add black to a "qa" target to make it a standardised process.
This commit is contained in:
@@ -7,7 +7,9 @@ class Usecase:
|
||||
|
||||
def execute(self):
|
||||
address = self.file.create_entity(self.settings["ifc_class"], "OFFICE")
|
||||
addresses = list(self.settings["assigned_object"].Addresses) if self.settings["assigned_object"].Addresses else []
|
||||
addresses = (
|
||||
list(self.settings["assigned_object"].Addresses) if self.settings["assigned_object"].Addresses else []
|
||||
)
|
||||
addresses.append(address)
|
||||
self.settings["assigned_object"].Addresses = addresses
|
||||
return address
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
self.file = file
|
||||
self.settings = {
|
||||
"address": None,
|
||||
"attributes": {}
|
||||
}
|
||||
self.settings = {"address": None, "attributes": {}}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
self.file = file
|
||||
self.settings = {
|
||||
"organisation": None,
|
||||
"attributes": {}
|
||||
}
|
||||
self.settings = {"organisation": None, "attributes": {}}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
self.file = file
|
||||
self.settings = {
|
||||
"person": None,
|
||||
"attributes": {}
|
||||
}
|
||||
self.settings = {"person": None, "attributes": {}}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
self.file = file
|
||||
self.settings = {
|
||||
"role": None,
|
||||
"attributes": {}
|
||||
}
|
||||
self.settings = {"role": None, "attributes": {}}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
def get_person(ifc):
|
||||
people = ifc.by_type("IfcPerson") or [None]
|
||||
return people [0]
|
||||
return people[0]
|
||||
|
||||
|
||||
def get_organisation(ifc):
|
||||
|
||||
Reference in New Issue
Block a user