7a979e9f720fb03af107bb89ad94247d76e150df,homeassistant/components/alarm_control_panel/egardia.py,EgardiaAlarm,lookupstatusfromcode,#EgardiaAlarm#Any#,157
Before Change
for i in self._rs_codes:
val = str(self._rs_codes[i]).strip()
if "," in val:
splitted = val.split(",")
for code in splitted:
code = str(code).strip()
if statuscode == code:
status = i.upper()
After Change
def lookupstatusfromcode(self, statuscode):
Look at the rs_codes and returns the status from the code.
status = next((
status_group.upper() for status_group, codes
in self._rs_codes.items() for code in codes
if statuscode == code), "UNKNOWN")
return status
def parsestatus(self, status):
Parse the status.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: home-assistant/home-assistant
Commit Name: 7a979e9f720fb03af107bb89ad94247d76e150df
Time: 2018-03-02
Author: jeroen_ter_heerdt@hotmail.com
File Name: homeassistant/components/alarm_control_panel/egardia.py
Class Name: EgardiaAlarm
Method Name: lookupstatusfromcode
Project Name: KhronosGroup/NNEF-Tools
Commit Name: b11ee7e68b9057f6be1239f097da233237fd2ddd
Time: 2019-05-08
Author: tamas.danyluk2@gmail.com
File Name: nnef_tools/io/nnef/nnef_graph.py
Class Name: NNEFGraph
Method Name: generate_missing_names
Project Name: kmike/pymorphy2
Commit Name: 47e33878a913e08694da03d38b641f5a6ff6a2d7
Time: 2013-03-08
Author: kmike84@gmail.com
File Name: tests/test_lexemes.py
Class Name:
Method Name: