mypy: Rewrite trac integration for clarity & to pass strict-optional.

This commit is contained in:
neiljp (Neil Pilgrim) 2017-12-22 22:17:13 -08:00 committed by showell
parent 33ccc04a32
commit fc460dc12b

View file

@ -115,9 +115,9 @@ class ZulipPlugin(Component):
else: else:
content += ":\n\n" content += ":\n\n"
field_changes = [] field_changes = []
for key in old_values.keys(): for key, value in old_values.items():
if key == "description": if key == "description":
content += '- Changed %s from %s\n\nto %s' % (key, markdown_block(old_values.get(key)), content += '- Changed %s from %s\n\nto %s' % (key, markdown_block(value),
markdown_block(ticket.values.get(key))) markdown_block(ticket.values.get(key)))
elif old_values.get(key) == "": elif old_values.get(key) == "":
field_changes.append('%s: => **%s**' % (key, ticket.values.get(key))) field_changes.append('%s: => **%s**' % (key, ticket.values.get(key)))