python: Replace unnecessary intermediate lists with generators.

Mostly suggested by the flake8-comprehension plugin.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-09-01 21:20:26 -07:00
committed by Tim Abbott
parent 1ded51aa9d
commit ab120a03bc
36 changed files with 83 additions and 82 deletions

View File

@@ -94,7 +94,7 @@ def update_realmauditlog_values(apps: StateApps, schema_editor: DatabaseSchemaEd
new_value = new_value['id']
# Sanity check that the original event has exactly the keys we expect.
assert set(extra_data.keys()) <= set([OLD_VALUE, NEW_VALUE])
assert set(extra_data.keys()) <= {OLD_VALUE, NEW_VALUE}
ra.extra_data = json.dumps({
OLD_VALUE: old_value,