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 2020/01/02 22:15:34 UTC

[GitHub] [airflow] potiuk edited a comment on issue #7007: [AIRFLOW-6428] Add dates module to airflow/utils/__init__.py

potiuk edited a comment on issue #7007: [AIRFLOW-6428] Add dates module to airflow/utils/__init__.py
URL: https://github.com/apache/airflow/pull/7007#issuecomment-570373212
 
 
   Why don't we do it "properly" ... I am not sure why we are using those imports in this form? Do we have something that holds us back from changing all "days_ago" imports to the form that is much more pythonic (IMHO)? 
   
   I believe 
   ```
   import airflow
   ```
   and then using
   ```
   airflow.utils.dates.days_ago(2)
   ```
   
   is much worse than 
   ```
   from airflow.utils.dates import days_ago
   ```
   See here:
   
   <img width="489" alt="Screenshot 2020-01-02 at 23 09 14" src="https://user-images.githubusercontent.com/595491/71696484-5d8be080-2db5-11ea-8403-49a845a25510.png">
   
   WDYT @kaxil?
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services