From fa79208a1c9e6c988c70e6c7018242f6ebb57152 Mon Sep 17 00:00:00 2001 From: GeekAngus Date: Sun, 18 Aug 2024 00:33:59 +0800 Subject: [PATCH] Update udfs.py black format --- dags/ods/ig_post_insights/udfs.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dags/ods/ig_post_insights/udfs.py b/dags/ods/ig_post_insights/udfs.py index 09f3454..e108f67 100644 --- a/dags/ods/ig_post_insights/udfs.py +++ b/dags/ods/ig_post_insights/udfs.py @@ -55,11 +55,15 @@ def save_posts_and_insights() -> None: posts = request_posts_data() last_post = query_last_post() - new_posts = [ - post - for post in posts - if post["timestamp"] > last_post["created_at"].timestamp() - ] if last_post else posts + new_posts = ( + [ + post + for post in posts + if post["timestamp"] > last_post["created_at"].timestamp() + ] + if last_post + else posts + ) if not dump_posts_to_bigquery( [