XD-DENG commented on a change in pull request #13732:
URL: https://github.com/apache/airflow/pull/13732#discussion_r559458200



##########
File path: airflow/models/dag.py
##########
@@ -1538,7 +1538,7 @@ def pickle_info(self):
             dttm = timezone.utcnow()
             pickled = pickle.dumps(self)
             d['pickle_len'] = len(pickled)
-            d['pickling_duration'] = "{}".format(timezone.utcnow() - dttm)
+            d['pickling_duration'] = f"{timezone.utcnow() - dttm}"

Review comment:
       Here using `str(timezone.utcnow() - dttm})` may make more sense than 
f"{timezone.utcnow() - dttm}" IMO, given it's purely a type conversion rather 
than formating.

##########
File path: airflow/cli/commands/dag_command.py
##########
@@ -166,7 +166,7 @@ def set_is_paused(is_paused, args):
         is_paused=is_paused,
     )
 
-    print("Dag: {}, paused: {}".format(args.dag_id, str(is_paused)))
+    print(f"Dag: {args.dag_id}, paused: {str(is_paused)}")

Review comment:
       nit: the `str()` can be removed?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to