You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/08 15:47:33 UTC

[GitHub] [airflow] dstandish commented on a diff in pull request #23574: Don't rely on current ORM structure for db clean command

dstandish commented on code in PR #23574:
URL: https://github.com/apache/airflow/pull/23574#discussion_r892554216


##########
airflow/utils/db.py:
##########
@@ -854,7 +854,7 @@ def check_conn_id_duplicates(session: Session) -> Iterable[str]:
         )
 
 
-def reflect_tables(tables: List[Union[Base, str]], session):
+def reflect_tables(tables: Optional[List[Union[Base, str]]], session):

Review Comment:
   Right exactly, calling `reflect_tables(tables=[])` feels just a little bit icky compared to `reflect_tables(tables=None)`.
   
   I guess the idea with `if not tables:` is that whether user gives `[]` or `None` the effect is the same -- we'll reflect all tables.  But I guess yeah we could make it so that if you pass empty list it just does _nothing_  -- just seems odd, why you'd want to do that...
   
   



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