def remove_coding(text):
    sub_re = re.compile("^#\s*-\*-\s*coding:\s*.*-\*-$", flags=re.MULTILINE)
    return sub_re.sub("", text)

#------------------------------------------------------------------------------
# Template
#------------------------------------------------------------------------------
Remove the coding comment, which six.exec_ doesn't like.
dataset/ETHPy150Open mwaskom/seaborn/doc/sphinxext/plot_directive.py/remove_coding