Fix pylint/flake8 errors of last commit
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Benjamin Renard 2022-08-01 19:56:26 +02:00
parent 2198fa2b21
commit 6aefda385c

20
gitdch
View file

@ -131,7 +131,7 @@ parser.add_argument(
'--release-notes', '--release-notes',
type=str, type=str,
dest='release_notes', dest='release_notes',
help='Specify the Markdown release notes output path (default: not generated)', help='Specify an optional Markdown release notes output path'
) )
@ -269,12 +269,14 @@ else:
print(''.join(changelog_lines)) print(''.join(changelog_lines))
if options.release_notes: if options.release_notes:
log.info('Generate Markdown release notes') log.info('Generate Markdown release notes')
release_notes_lines = [f'# Changelog:\n\n'] release_notes_lines = ['# Changelog:\n\n']
release_notes_lines.extend([ release_notes_lines.extend([
f'* {message}\n' f'* {message}\n'
for message in versions[0]['messages'] for message in versions[0]['messages']
]) ])
log.info('Write generated Markdown release notes in file %s', options.release_notes) log.info(
with open(options.release_notes, 'w', encoding='utf8') as fd: 'Write generated Markdown release notes in file %s',
options.release_notes)
with open(options.release_notes, 'w', encoding='utf8') as fd:
fd.writelines(release_notes_lines) fd.writelines(release_notes_lines)