Fix pylint/flake8 errors of last commit
This commit is contained in:
parent
2198fa2b21
commit
6aefda385c
1 changed files with 11 additions and 9 deletions
20
gitdch
20
gitdch
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue