potiuk edited a comment on pull request #19419:
URL: https://github.com/apache/airflow/pull/19419#issuecomment-961705849


   Should we stop using regexp for that one?
   
    The old Chinese proverb says: "If you have a problem, introduce regexp - 
you will have two problems". This regexp will be impossible to reason about, 
fix and improve by anyone who will add a different pattern in the future.
   
   Why don't we ast.parse() the example Dags and walk the tree and find 
default_args  and start_date ? That sounds like 20 lines of python code that 
will handle REALLY all cases. (and it has a bonus - we will also validate that 
example dags are parseable Python files). 


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


Reply via email to