Lee-W commented on code in PR #44226:
URL: https://github.com/apache/airflow/pull/44226#discussion_r1851765753
##########
airflow/api_fastapi/common/db/common.py:
##########
@@ -47,40 +52,45 @@ def your_route(session: Annotated[Session,
Depends(get_session)]):
yield session
-def apply_filters_to_select(base_select: Select, filters: Sequence[BaseParam |
None]) -> Select:
- base_select = base_select
- for filter in filters:
- if filter is None:
+def apply_filters_to_select(
+ *, base_select: Select, filters: Sequence[BaseParam | None] | None = None
+) -> Select:
+ if filters is None:
+ return base_select
+ for f in filters:
Review Comment:
I thought of it. but `filter` is a keyword. probably not the best idea to do
so 🤔
--
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]