532c5db2b1520bc7422fa106576b11e36f4721ab,Orange/canvas/help/manager.py,,create_html_inventory_provider,#Any#,337

Before Change



        // Extract all format fields
        format_iter = formatter.parse(target)
        fields = list(map(itemgetter(1), format_iter))
        fields = [_f for _f in set(fields) if _f]

        if "DEVELOP_ROOT" in fields:
            if not is_develop_egg(dist):
                // skip the location
                continue
            target = formatter.format(target, DEVELOP_ROOT=dist.location)
            if os.path.exists(target):
                return provider.HtmlIndexProvider(
                    inventory=QUrl.fromLocalFile(target),
                    xpathquery=xpathquery)
            else:
                continue
        elif fields:
            try:
                target = formatter.format(target, **replacements)
            except KeyError:
                log.exception("Error while formating doc root mapping",
                              target)
                continue

            return provider.HtmlIndexProvider(
                inventory=target, xpathquery=xpathquery)
        else:
            return provider.HtmlIndexProvider(
                inventory=target, xpathquery=xpathquery)

    return None

_providers = {
    "intersphinx": create_intersphinx_provider,

After Change


        format_iter = formatter.parse(target)
        fields = {name for _, name, _, _ in format_iter if name}

        if not set(fields) <= set(replacements.keys()):
            log.warning("Invalid replacement fields %s",
                        set(fields) - set(replacements.keys()))
            continue
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: biolab/orange3
Commit Name: 532c5db2b1520bc7422fa106576b11e36f4721ab
Time: 2015-08-06
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/canvas/help/manager.py
Class Name:
Method Name: create_html_inventory_provider


Project Name: dask/dask-ml
Commit Name: 28793deaf98b37ef5d9425c1ec975a11b397e465
Time: 2018-10-13
Author: github@stsievert.com
File Name: dask_ml/model_selection/_incremental.py
Class Name: BaseIncrementalSearchCV
Method Name: _get_best


Project Name: biolab/orange3
Commit Name: 532c5db2b1520bc7422fa106576b11e36f4721ab
Time: 2015-08-06
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/canvas/help/manager.py
Class Name:
Method Name: create_html_provider