You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "MichaReiser (via GitHub)" <gi...@apache.org> on 2024/02/12 12:14:04 UTC

Re: [PR] Preview Ruff 2024 style guide (DO NOT MERGE) [airflow]

MichaReiser commented on code in PR #37355:
URL: https://github.com/apache/airflow/pull/37355#discussion_r1486051191


##########
airflow/providers/google/cloud/hooks/bigquery.py:
##########
@@ -1934,9 +1934,11 @@ def run_copy(
                 default_project_id=self.project_id,
                 var_name="source_project_dataset_table",
             )
-            source_project_dataset_tables_fixup.append(
-                {"projectId": source_project, "datasetId": source_dataset, "tableId": source_table}
-            )
+            source_project_dataset_tables_fixup.append({
+                "projectId": source_project,
+                "datasetId": source_dataset,
+                "tableId": source_table,
+            })

Review Comment:
   Another instance where hugging expands the entire *hugged* expression.



##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -286,9 +286,9 @@ def __get_concurrency_maps(self, states: Iterable[TaskInstanceState], session: S
             .where(TI.state.in_(states))
             .group_by(TI.task_id, TI.run_id, TI.dag_id)
         )
-        return ConcurrencyMap.from_concurrency_map(
-            {(dag_id, run_id, task_id): count for task_id, run_id, dag_id, count in ti_concurrency_query}
-        )
+        return ConcurrencyMap.from_concurrency_map({
+            (dag_id, run_id, task_id): count for task_id, run_id, dag_id, count in ti_concurrency_query
+        })

Review Comment:
   Any opinions on whether you prefer the old formatting over the new in this specific instance where the entire dictionary expression fits on its own line would be great because that's one outstanding [style issue](https://github.com/astral-sh/ruff/issues/9029).



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org