@@ -20,11 +20,11 @@ class PosParser:
2020 """Support class for producing Pos events."""
2121
2222 @classmethod
23- def __parse_xml (
23+ def _parse_xml (
2424 cls , position_type : PositionType , event_bus : EventBus , xml : Element
2525 ) -> HandlingResult :
2626 """Handle xml message and notify the correct event subscribers."""
27- if (p := xml .attrib .get ("p" )) and (xml .attrib .get ("valid" , "1" )) ! = "1" :
27+ if (p := xml .attrib .get ("p" )) and (xml .attrib .get ("valid" , "1" )) = = "1" :
2828 p_x , p_y = p .split ("," , 2 )
2929 p_a = xml .attrib .get ("a" , 0 )
3030 position = Position (type = position_type , x = int (p_x ), y = int (p_y ), a = int (p_a ))
@@ -48,7 +48,7 @@ def _handle_xml(cls, event_bus: EventBus, xml: Element) -> HandlingResult:
4848 if xml .attrib .get ("ret" ) != "ok" or xml .attrib .get ("t" ) != "p" :
4949 return HandlingResult .analyse ()
5050
51- return cls .__parse_xml (PositionType .DEEBOT , event_bus , xml )
51+ return cls ._parse_xml (PositionType .DEEBOT , event_bus , xml )
5252
5353
5454class GetChargerPos (XmlCommandWithMessageHandling , PosParser ):
@@ -65,4 +65,4 @@ def _handle_xml(cls, event_bus: EventBus, xml: Element) -> HandlingResult:
6565 if xml .attrib .get ("ret" ) != "ok" :
6666 return HandlingResult .analyse ()
6767
68- return cls .__parse_xml (PositionType .CHARGER , event_bus , xml )
68+ return cls ._parse_xml (PositionType .CHARGER , event_bus , xml )
0 commit comments