guptakushal03 opened a new pull request, #70250:
URL: https://github.com/apache/airflow/pull/70250

   Fixes `datetime.datetime`-typed CLI parameter parsing in `airflowctl`.
   
   Previously, `datetime.datetime` parameters were mapped directly to the 
`datetime.datetime` constructor, causing valid ISO-8601 datetime strings (for 
example, `2026-07-01` and `2026-07-01T14:30:00`) to be rejected by `argparse`.
   
   This change:
   
   * Adds `iso_datetime_type()` to parse ISO-8601 datetime strings using 
`datetime.datetime.fromisoformat()`.
   * Updates `datetime.datetime`-typed CLI arguments to use the parser instead 
of the bare constructor.
   * Adds unit tests covering valid datetime inputs and invalid values that 
should raise `argparse.ArgumentTypeError`.
   
   closes: #70232
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   * [x] Yes (ChatGPT)
   
   Generated-by: ChatGPT following the guidelines.


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