Partially Use f string (#10218)

* flynt. trial 1.

* Trial 1.

* Addressed code review.
This commit is contained in:
SangBin Cho
2020-08-20 18:21:16 -07:00
committed by GitHub
parent 07cd815e5a
commit 92664249e8
41 changed files with 195 additions and 238 deletions
+3 -4
View File
@@ -133,8 +133,7 @@ class Monitor:
available_resources, resource_load)
else:
logger.warning(
"Monitor: "
"could not find ip for client {}".format(client_id))
f"Monitor: could not find ip for client {client_id}")
self.handle_resource_demands(message.resource_load_by_shape)
def xray_job_notification_handler(self, unused_channel, data):
@@ -366,8 +365,8 @@ if __name__ == "__main__":
redis_client = ray.services.create_redis_client(
args.redis_address, password=args.redis_password)
traceback_str = ray.utils.format_error_message(traceback.format_exc())
message = "The monitor failed with the following error:\n{}".format(
traceback_str)
message = ("The monitor failed with the "
f"following error:\n{traceback_str}")
ray.utils.push_error_to_driver_through_redis(
redis_client, ray_constants.MONITOR_DIED_ERROR, message)
raise e