c786913462decebc4157ac3e8d2ec08303021adc,lib/streamlit/config.py,,get_s3_option,#Any#,155

Before Change


    sys.exit(-1)

    if option == "profile":
        return get_option("storage.s3")["profile"]


def saving_is_configured():
    Returns true if S3 (and eventually GCS?) saving is configured properly

After Change


        LOGGER.debug(f"Getting option "{option}" which maps to "{new_option}" or "{old_option}".")
    except KeyError:
        raise RuntimeError("S3 Option "%s" not recognized." % option)
    if get_option(new_option) is not None:
        return get_option(new_option)
    elif old_option is None:
        return None
    elif get_option(old_option) is None:
        return None
    else:
        LOGGER.warning(f"DEPRECATION WARNING: Please update ~/.streamlit/config.yaml by renaming "{old_option}" to "{new_option}".")
        return get_option(old_option)

def saving_is_configured():
    Returns true if S3 (and eventually GCS?) saving is configured properly
    for this session.
    return (get_s3_option("bucket") is not None)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: streamlit/streamlit
Commit Name: c786913462decebc4157ac3e8d2ec08303021adc
Time: 2018-07-02
Author: adrien.g.treuille@gmail.com
File Name: lib/streamlit/config.py
Class Name:
Method Name: get_s3_option


Project Name: dmlc/gluon-nlp
Commit Name: 03b0e7061cf477fbeccb9c128ee76603df582d86
Time: 2018-09-04
Author: leonard@lausen.nl
File Name: scripts/word_embeddings/evaluate_pretrained.py
Class Name:
Method Name:


Project Name: streamlit/streamlit
Commit Name: cf2e5c02c448c6f25136a4cd1b89e7f0ba1a3d37
Time: 2018-07-06
Author: adrien.g.treuille@gmail.com
File Name: lib/streamlit/config.py
Class Name:
Method Name: get_s3_option