db23320659a711637b5164fbe6ae6db15cc48e48,homeassistant/components/sensor/apcupsd.py,,setup_platform,#Any#Any#Any#Any#,22

Before Change


            "You must include a "%s" when configuring an APCUPSd sensor.",
            apcupsd.CONF_TYPE)
        return False
    typ = typ.upper()

    if typ not in apcupsd.DATA.status:
        _LOGGER.error(
            "Specified "%s" of "%s" does not appear in the APCUPSd status "

After Change


    for resource in config["resources"]:
        sensor_type = resource.lower()

        if sensor_type not in SENSOR_TYPES:
            SENSOR_TYPES[sensor_type] = [
                sensor_type.title(), "", "mdi:information-outline"]

        if sensor_type.upper() not in apcupsd.DATA.status:
            _LOGGER.warning(
                "Sensor type: "%s" does not appear in the APCUPSd status "
                "output.", sensor_type)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: home-assistant/home-assistant
Commit Name: db23320659a711637b5164fbe6ae6db15cc48e48
Time: 2016-07-06
Author: dale3h@gmail.com
File Name: homeassistant/components/sensor/apcupsd.py
Class Name:
Method Name: setup_platform


Project Name: commonsense/conceptnet5
Commit Name: f1fc699be9ce8b249cf5bd670d2200f990a5294d
Time: 2016-09-09
Author: rob@luminoso.com
File Name: conceptnet5/vectors/evaluation/analogy.py
Class Name:
Method Name: eval_analogies


Project Name: scikit-learn-contrib/DESlib
Commit Name: ec396411be11d514a44a18813278f3a41c73ac5f
Time: 2018-09-23
Author: Natlem@users.noreply.github.com
File Name: deslib/des/des_knn.py
Class Name: DESKNN
Method Name: __init__