216e20a8ca8e53aa1da7538b242ce29e2d521d7c,sacred/commands.py,,non_unicode_repr,#Any#Any#Any#Any#,18

Before Change


    Used to override the pprint format method in order to get rid of
    unnecessary unicode prefixes. E.g.: "John" instead of u"John".
    
    if type(objekt) is unicode:
        try:
            objekt = str(objekt)
        except UnicodeEncodeError:
            pass

    return pprint._safe_repr(objekt, context, maxlevels, level)

PRINTER = pprint.PrettyPrinter()
PRINTER.format = non_unicode_repr

After Change


    repr_string, isreadable, isrecursive = pprint._safe_repr(objekt, context,
                                                             maxlevels, level)
    if repr_string.startswith("u"") or repr_string.startswith("u""):
        repr_string = repr_string[1:]
    return repr_string, isreadable, isrecursive

PRINTER = pprint.PrettyPrinter()
PRINTER.format = non_unicode_repr
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: IDSIA/sacred
Commit Name: 216e20a8ca8e53aa1da7538b242ce29e2d521d7c
Time: 2014-09-25
Author: klaus@idsia.ch
File Name: sacred/commands.py
Class Name:
Method Name: non_unicode_repr


Project Name: dmbee/seglearn
Commit Name: b7eb836b40893bc25e782658cfec6f7bd6c4c451
Time: 2018-03-06
Author: david.mo.burns@gmail.com
File Name: seglearn/segment.py
Class Name: Segment
Method Name: transform


Project Name: IndicoDataSolutions/finetune
Commit Name: bd18db469c937fcfe0ea1835784ce10147780c7c
Time: 2019-08-02
Author: matthew.bayer@indico.io
File Name: finetune/base_models/bert/encoder.py
Class Name: BERTEncoder
Method Name: _encode


Project Name: MTG/freesound
Commit Name: f79be70049e77a28404a02f03678a9a7468d80ed
Time: 2018-04-16
Author: frederic.font@gmail.com
File Name: utils/sound_upload.py
Class Name:
Method Name: create_sound