23e7d20abbcec065a63c0ec31f5dcca481f41615,plotnine/aes.py,,rename_aesthetics,#Any#,146

Before Change


        d["color"] = d.pop("colour")

    with suppress(KeyError):
        d["outlier_color"] = d.pop("outlier_colour")
    return d


def get_calculated_aes(aesthetics):

After Change


    obj : dict or list
        Object that contains aesthetics names
    
    lookup = {
        "colour": "color",
        "outlier_colour": "outlier_color",
    }

    if isinstance(obj, dict):
        for k in lookup:
            with suppress(KeyError):
                obj["color"] = obj.pop("colour")
    else:
        obj = [lookup[x] if x in lookup else x for x in obj]
    return obj

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: has2k1/plotnine
Commit Name: 23e7d20abbcec065a63c0ec31f5dcca481f41615
Time: 2018-06-26
Author: has2k1@gmail.com
File Name: plotnine/aes.py
Class Name:
Method Name: rename_aesthetics


Project Name: has2k1/plotnine
Commit Name: 14538c6714f45c0dbd6c95ff351c272c9cf85701
Time: 2014-04-29
Author: has2k1@gmail.com
File Name: ggplot/stats/stat_vline.py
Class Name: stat_vline
Method Name: _calculate


Project Name: has2k1/plotnine
Commit Name: 14538c6714f45c0dbd6c95ff351c272c9cf85701
Time: 2014-04-29
Author: has2k1@gmail.com
File Name: ggplot/stats/stat_hline.py
Class Name: stat_hline
Method Name: _calculate