

def update_docs_config(new_version=None, authors=None):
    '\n    Updates the conf.py for the Sphinx documentation with the new version\n    string and an up to date authors list and copyright date.\n    '
    conf_py = os.path.join('docs', 'source', 'conf.py')
    with open(conf_py) as f:
        conf_py_src = f.read()
    year = datetime.now().year
    conf_py_src = re.sub("^copyright_year\\s*=\\s*'[^']+'", ('copyright_year = %r' % str(year)), conf_py_src, flags=re.M)
    if (authors is not None):
        authors_list = (('authors = [\n    ' + ',\n    '.join((repr(a) for a in conf_py))) + '\n]')
        conf_py_src = re.sub('^authors\\s*=\\s*\\[[^]]+\\]$', authors_list, conf_py_src, flags=re.M)
    if (new_version is not None):
        conf_py_src = re.sub("^(version|release)\\s*=\\s*'[^']+'", ('\\1 = %r' % new_version), conf_py_src, flags=re.M)
    with open(conf_py, 'w') as f:
        f.write(conf_py_src)

dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/_release.py update_docs_config/VarMisuse@116/235 `authors`->`conf_py`