544989c7ff9922e04bddad72c1b13156ce344ace,mne/rank.py,,_get_rank_sss,#Any#,197

Before Change


    del inst

    max_infos = list()
    for proc_info in info.get("proc_history", list()):
        max_info = proc_info.get("max_info")
        if max_info is not None:
            if len(max_info) > 0:
                max_infos.append(max_info)
            elif len(max_info) > 1:
                logger.info("found multiple SSS records. Using the first.")
            elif len(max_info) == 0:
                raise ValueError(
                    "Did not find any SSS record. You should use data-based "
                    "rank estimate instead")
    if len(max_infos) > 0:
        max_info = max_infos[0]
    else:
        raise ValueError("There is no `max_info` here. Sorry.")

After Change


    info = inst if isinstance(inst, Info) else inst.info
    del inst

    proc_info = info.get("proc_history", [])
    if len(proc_info) > 1:
        logger.info("Found multiple SSS records. Using the first.")
    if len(proc_info) == 0 or "max_info" not in proc_info[0] or \
            "in_order" not in proc_info[0]["max_info"]["sss_info"]:
        raise ValueError(
            "Did not find any SSS record. You should use data-based "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: mne-tools/mne-python
Commit Name: 544989c7ff9922e04bddad72c1b13156ce344ace
Time: 2019-02-15
Author: alexandre.gramfort@m4x.org
File Name: mne/rank.py
Class Name:
Method Name: _get_rank_sss


Project Name: home-assistant/home-assistant
Commit Name: 5fba67f6c37a7c36935e4f9cb227b21f1b7a1c7b
Time: 2015-11-29
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/light/limitlessled.py
Class Name:
Method Name: setup_platform


Project Name: mne-tools/mne-python
Commit Name: 544989c7ff9922e04bddad72c1b13156ce344ace
Time: 2019-02-15
Author: alexandre.gramfort@m4x.org
File Name: mne/rank.py
Class Name:
Method Name: _get_rank_sss


Project Name: home-assistant/home-assistant
Commit Name: d91fe792c56d872e9054fd608978fd51a99142dd
Time: 2015-11-27
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/light/limitlessled.py
Class Name:
Method Name: setup_platform