mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
Run black on IOS-Python
This commit is contained in:
+3
-11
@@ -1,10 +1,7 @@
|
||||
import time
|
||||
import ifcopenshell
|
||||
|
||||
names = [
|
||||
("Same", "Same"),
|
||||
("Different", "SomethingElse")
|
||||
]
|
||||
names = [("Same", "Same"), ("Different", "SomethingElse")]
|
||||
|
||||
make_prop = lambda f: lambda nm: f.createIfcPropertySingleValue(Name=nm)
|
||||
|
||||
@@ -19,11 +16,6 @@ for nms in names:
|
||||
appl = f.createIfcApplication(o, ifcopenshell.version, "IfcOpenShell", f"IfcOpenShell {ifcopenshell.version}")
|
||||
units = f.createIfcUnitAssignment(Units=[f.createIfcSIUnit(None, "LENGTHUNIT", None, "METRE")])
|
||||
ownerhist = f.createIfcOwnerHistory(pando, appl, ChangeAction="ADDED", CreationDate=int(time.time()))
|
||||
f.createIfcPropertySet(
|
||||
ifcopenshell.guid.new(),
|
||||
ownerhist,
|
||||
"MyPset",
|
||||
HasProperties=map(make_prop(f), nms)
|
||||
)
|
||||
f.createIfcPropertySet(ifcopenshell.guid.new(), ownerhist, "MyPset", HasProperties=map(make_prop(f), nms))
|
||||
f.write(f"{'pass' if len(set(nms)) == len(nms) else 'fail'}-property-{'-'.join(map(str.lower, nms))}-ifc2x3.ifc")
|
||||
15
|
||||
15
|
||||
|
||||
Reference in New Issue
Block a user