mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
python: Convert more percent formatting to Python 3.6 f-strings.
Generated by pyupgrade --py36-plus. Now including %d, %i, %u, and multi-line strings. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
1ed2d9b4a0
commit
74c17bf94a
@@ -235,7 +235,7 @@ def convert_gitter_workspace_messages(gitter_data: GitterDataT, output_dir: str,
|
||||
|
||||
message_json['zerver_message'] = zerver_message
|
||||
message_json['zerver_usermessage'] = zerver_usermessage
|
||||
message_filename = os.path.join(output_dir, "messages-%06d.json" % (dump_file_id,))
|
||||
message_filename = os.path.join(output_dir, f"messages-{dump_file_id:06}.json")
|
||||
logging.info("Writing Messages to %s\n", message_filename)
|
||||
write_data_to_file(os.path.join(message_filename), message_json)
|
||||
|
||||
|
||||
@@ -745,7 +745,7 @@ def process_raw_message_batch(realm_id: int,
|
||||
)
|
||||
|
||||
dump_file_id = NEXT_ID('dump_file_id')
|
||||
message_file = "/messages-%06d.json" % (dump_file_id,)
|
||||
message_file = f"/messages-{dump_file_id:06}.json"
|
||||
create_converted_data_files(message_json, output_dir, message_file)
|
||||
|
||||
def do_convert_data(input_tar_file: str,
|
||||
|
||||
@@ -390,7 +390,7 @@ def process_raw_message_batch(realm_id: int,
|
||||
)
|
||||
|
||||
dump_file_id = NEXT_ID('dump_file_id' + str(realm_id))
|
||||
message_file = "/messages-%06d.json" % (dump_file_id,)
|
||||
message_file = f"/messages-{dump_file_id:06}.json"
|
||||
create_converted_data_files(message_json, output_dir, message_file)
|
||||
|
||||
def process_posts(num_teams: int,
|
||||
|
||||
@@ -618,7 +618,7 @@ def convert_slack_workspace_messages(slack_data_dir: str, users: List[ZerverFiel
|
||||
zerver_message=zerver_message,
|
||||
zerver_usermessage=zerver_usermessage)
|
||||
|
||||
message_file = "/messages-%06d.json" % (dump_file_id,)
|
||||
message_file = f"/messages-{dump_file_id:06}.json"
|
||||
logging.info("Writing Messages to %s\n", output_dir + message_file)
|
||||
create_converted_data_files(message_json, output_dir, message_file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user