@release.command()
def datestamp():
    "Enter today's date as the release date in the changelog.\n    "
    dt = datetime.datetime.now()
    stamp = '({} {}, {})'.format(dt.strftime('%B'), dt.day, dt.year)
    marker = '(in development)'
    lines = []
    underline_length = None
    with open(CHANGELOG) as f:
        for line in f:
            if (marker in line):
                line = line.replace(marker, stamp)
                lines.append(line)
                underline_length = len(line.strip())
            elif underline_length:
                lines.append((('-' * underline_length) + '\n'))
                underline_length = None
            else:
                lines.append(line)
    with open(CHANGELOG, 'w') as f:
        for line in lines:
            f.write(line)
Enter today's date as the release date in the changelog.
@release.command()
def datestamp():
    "\n    "
    dt = datetime.datetime.now()
    stamp = '({} {}, {})'.format(dt.strftime('%B'), dt.day, dt.year)
    marker = '(in development)'
    lines = []
    underline_length = None
    with open(CHANGELOG) as f:
        for line in f:
            if (marker in line):
                line = line.replace(marker, stamp)
                lines.append(line)
                underline_length = len(line.strip())
            elif underline_length:
                lines.append((('-' * underline_length) + '\n'))
                underline_length = None
            else:
                lines.append(line)
    with open(CHANGELOG, 'w') as f:
        for line in lines:
            f.write(line)