The following code:
foriinrange(3):
properties.append({
"name": "number_%d"%i,
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "ZERO,ONE,TWO,THREE,FOUR,FIVE",
})Will be formatted like this:
foriinrange(3):
properties.append(
{
"name": "number_%d"%i,
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "ZERO,ONE,TWO,THREE,FOUR,FIVE",
}
)But I think the original version reads better. I took the code from this example.
Also if the dictionary is shorter (I just removed the last line from the previous example):
foriinrange(3):
properties.append({
"name": "number_%d"%i,
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
})It will be formatted like this:
foriinrange(3):
properties.append({ "name": "number_%d"%i, "type": TYPE_INT, "hint": PROPERTY_HINT_ENUM })But I'd expect the shape to be preserved since I have a comma at the end.
The following code:
Will be formatted like this:
But I think the original version reads better. I took the code from this example.
Also if the dictionary is shorter (I just removed the last line from the previous example):
It will be formatted like this:
But I'd expect the shape to be preserved since I have a comma at the end.