uranusjr commented on code in PR #33455:
URL: https://github.com/apache/airflow/pull/33455#discussion_r1299736279


##########
tests/providers/apache/kylin/operators/test_kylin_cube.py:
##########
@@ -37,8 +37,8 @@ class TestKylinCubeOperator:
         "project": "learn_kylin",
         "cube": "kylin_sales_cube",
         "command": "build",
-        "start_time": datetime(2012, 1, 2, 0, 0).strftime("%s") + "000",
-        "end_time": datetime(2012, 1, 3, 0, 0).strftime("%s") + "000",
+        "start_time": f"{datetime(2012, 1, 2, 0, 0):%s}000",
+        "end_time": f"{datetime(2012, 1, 3, 0, 0):%s}000",

Review Comment:
   It’s probably better to just convert these to literals with a comment, going 
through datetime just to convert into a datetime is a bit over the top. 



##########
tests/providers/apache/kylin/operators/test_kylin_cube.py:
##########
@@ -37,8 +37,8 @@ class TestKylinCubeOperator:
         "project": "learn_kylin",
         "cube": "kylin_sales_cube",
         "command": "build",
-        "start_time": datetime(2012, 1, 2, 0, 0).strftime("%s") + "000",
-        "end_time": datetime(2012, 1, 3, 0, 0).strftime("%s") + "000",
+        "start_time": f"{datetime(2012, 1, 2, 0, 0):%s}000",
+        "end_time": f"{datetime(2012, 1, 3, 0, 0):%s}000",

Review Comment:
   It’s probably better to just convert these to literals with a comment, going 
through datetime just to convert into a datetime is a bit over the top. 



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to