Skip to content

Commit 2e2f970

Browse files
committed
Black formatting
1 parent adc918c commit 2e2f970

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

pytiled_parser/parsers/json/tiled_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,13 +325,13 @@ def parse(
325325
raw_object["properties"] = []
326326

327327
for prop in loaded_template["properties"]:
328-
328+
329329
found = False
330330
for prop2 in raw_object["properties"]:
331331
if prop2["name"] == prop["name"]:
332332
found = True
333333
break
334-
334+
335335
if not found:
336336
raw_object["properties"].append(prop)
337337
else:

pytiled_parser/parsers/tmx/tiled_object.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -277,24 +277,26 @@ def parse(raw_object: etree.Element, parent_dir: Optional[Path] = None) -> Tiled
277277
continue
278278
new_object.attrib[key] = val
279279

280-
281280
properties_element = raw_object.find("./properties")
282281
temp_properties_element = new_object.find("./properties")
283282
if properties_element is not None and temp_properties_element is None:
284283
new_object.append(properties_element)
285284
elif properties_element is None and temp_properties_element is not None:
286285
pass
287-
elif properties_element is not None and temp_properties_element is not None:
286+
elif (
287+
properties_element is not None
288+
and temp_properties_element is not None
289+
):
288290
for prop in temp_properties_element:
289-
290-
found = False
291-
for prop2 in properties_element:
292-
if prop.attrib["name"] == prop2.attrib["name"]:
293-
found = True
294-
break
295-
296-
if not found:
297-
properties_element.append(prop)
291+
292+
found = False
293+
for prop2 in properties_element:
294+
if prop.attrib["name"] == prop2.attrib["name"]:
295+
found = True
296+
break
297+
298+
if not found:
299+
properties_element.append(prop)
298300
new_object.remove(temp_properties_element)
299301
new_object.append(properties_element)
300302

0 commit comments

Comments
 (0)