make logging not use f-str, change others to f-str (#22882)

This commit is contained in:
Asuka Minato 2025-07-25 11:32:48 +09:00 • committed by GitHub
commit a189d293f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
164 changed files with 557 additions and 563 deletions

View file

@ -25,7 +25,7 @@ def add_annotation_to_index_task(
Usage: clean_dataset_task.delay(dataset_id, tenant_id, indexing_technique, index_struct)
"""
logging.info(click.style("Start build index for annotation: {}".format(annotation_id), fg="green"))
logging.info(click.style(f"Start build index for annotation: {annotation_id}", fg="green"))
start_at = time.perf_counter()
try:
@ -50,7 +50,7 @@ def add_annotation_to_index_task(
end_at = time.perf_counter()
logging.info(
click.style(
"Build index successful for annotation: {} latency: {}".format(annotation_id, end_at - start_at),
f"Build index successful for annotation: {annotation_id} latency: {end_at - start_at}",
fg="green",
)
)