python: Normalize quotes with Black.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-02-11 23:20:45 -08:00
committed by Tim Abbott
parent 11741543da
commit 6e4c3e41dc
989 changed files with 32792 additions and 32792 deletions

View File

@@ -13,17 +13,17 @@ class Command(BaseCommand):
help = """UserMessage fetching helper for export.py"""
def add_arguments(self, parser: ArgumentParser) -> None:
parser.add_argument('--path', help='Path to find messages.json archives')
parser.add_argument('--thread', help='Thread ID')
parser.add_argument("--path", help="Path to find messages.json archives")
parser.add_argument("--thread", help="Thread ID")
parser.add_argument(
'--consent-message-id',
"--consent-message-id",
type=int,
help='ID of the message advertising users to react with thumbs up',
help="ID of the message advertising users to react with thumbs up",
)
def handle(self, *args: Any, **options: Any) -> None:
logging.info("Starting UserMessage batch thread %s", options['thread'])
files = set(glob.glob(os.path.join(options['path'], 'messages-*.json.partial')))
logging.info("Starting UserMessage batch thread %s", options["thread"])
files = set(glob.glob(os.path.join(options["path"], "messages-*.json.partial")))
for partial_path in files:
locked_path = partial_path.replace(".json.partial", ".json.locked")
output_path = partial_path.replace(".json.partial", ".json")
@@ -32,7 +32,7 @@ class Command(BaseCommand):
except FileNotFoundError:
# Already claimed by another process
continue
logging.info("Thread %s processing %s", options['thread'], output_path)
logging.info("Thread %s processing %s", options["thread"], output_path)
try:
export_usermessages_batch(locked_path, output_path, options["consent_message_id"])
except BaseException: