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


def get_calculated_aes(aesthetics):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

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: analysiscenter/batchflow
Commit Name: 8a84a02f44efb38c339c019ab097b00fab3701af
Time: 2019-09-03
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/tf/encoder_decoder.py
Class Name: EncoderDecoder
Method Name: encoder


Project Name: analysiscenter/batchflow
Commit Name: 8a84a02f44efb38c339c019ab097b00fab3701af
Time: 2019-09-03
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/tf/encoder_decoder.py
Class Name: EncoderDecoder
Method Name: decoder