File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
pytiled_parser/parsers/tmx Expand file tree Collapse file tree 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:
133133 map_ .hex_side_length = int (raw_map .attrib ["hexsidelength" ])
134134
135135 properties_element = raw_map .find ("./properties" )
136- if properties_element :
136+ if properties_element is not None :
137137 map_ .properties = parse_properties (properties_element )
138138
139139 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:
5555 common .class_ = raw_object .attrib ["class" ]
5656
5757 properties_element = raw_object .find ("./properties" )
58- if properties_element :
58+ if properties_element is not None :
5959 common .properties = parse_properties (properties_element )
6060
6161 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:
3838 wang_color .class_ = raw_wang_color .attrib ["class" ]
3939
4040 properties = raw_wang_color .find ("./properties" )
41- if properties :
41+ if properties is not None :
4242 wang_color .properties = parse_properties (properties )
4343
4444 return wang_color
@@ -74,7 +74,7 @@ def parse(raw_wangset: etree.Element) -> WangSet:
7474 wangset .class_ = raw_wangset .attrib ["class" ]
7575
7676 properties = raw_wangset .find ("./properties" )
77- if properties :
77+ if properties is not None :
7878 wangset .properties = parse_properties (properties )
7979
8080 return wangset
You can’t perform that action at this time.
0 commit comments