532c5db2b1520bc7422fa106576b11e36f4721ab,Orange/canvas/help/manager.py,,create_html_provider,#Any#,293

Before Change


def create_html_provider(entry_point):
    locations = entry_point.load()
    dist = entry_point.dist
    replacements = {"PROJECT_NAME": dist.project_name,
                    "PROJECT_NAME_LOWER": dist.project_name.lower(),
                    "PROJECT_VERSION": dist.version}
    try:
        replacements["URL"] = get_dist_url(dist)
    except KeyError:
        pass

After Change


    for target in locations:
        // Extract all format fields
        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
        target = formatter.format(target, **replacements)

        targeturl = QUrl(target)
        if not targeturl.isValid():
            continue

        islocal = targeturl.scheme() == "" or targeturl.scheme() == "file"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

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_provider


Project Name: sahana/eden
Commit Name: a9dc3f6e92aa0204ecad749bcf72454a7135a6f9
Time: 2021-02-28
Author: dominic@nursix.org
File Name: modules/templates/RLP/notifications.py
Class Name: DeploymentNotifications
Method Name: json


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