File tree 3 files changed +4
-4
lines changed
pytiled_parser/parsers/tmx
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ def parse(file: Path) -> TiledMap:
133
133
map_ .hex_side_length = int (raw_map .attrib ["hexsidelength" ])
134
134
135
135
properties_element = raw_map .find ("./properties" )
136
- if properties_element :
136
+ if properties_element is not None :
137
137
map_ .properties = parse_properties (properties_element )
138
138
139
139
if raw_map .attrib .get ("staggeraxis" ) is not None :
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ def _parse_common(raw_object: etree.Element) -> TiledObject:
55
55
common .class_ = raw_object .attrib ["class" ]
56
56
57
57
properties_element = raw_object .find ("./properties" )
58
- if properties_element :
58
+ if properties_element is not None :
59
59
common .properties = parse_properties (properties_element )
60
60
61
61
return common
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def _parse_wang_color(raw_wang_color: etree.Element) -> WangColor:
38
38
wang_color .class_ = raw_wang_color .attrib ["class" ]
39
39
40
40
properties = raw_wang_color .find ("./properties" )
41
- if properties :
41
+ if properties is not None :
42
42
wang_color .properties = parse_properties (properties )
43
43
44
44
return wang_color
@@ -74,7 +74,7 @@ def parse(raw_wangset: etree.Element) -> WangSet:
74
74
wangset .class_ = raw_wangset .attrib ["class" ]
75
75
76
76
properties = raw_wangset .find ("./properties" )
77
- if properties :
77
+ if properties is not None :
78
78
wangset .properties = parse_properties (properties )
79
79
80
80
return wangset
You can’t perform that action at this time.
0 commit comments