Fury0508 commented on PR #60193:
URL: https://github.com/apache/airflow/pull/60193#issuecomment-3740592698

   @bugraoz93 Sorry for the multiple iterations - I truly appreciate your 
patience! I think I've got it right this time:
   
   **Changes made:**
   1. Kept `_create_arg` as a simple "dummy" pass-through method with no 
conditional logic
   2. Changed parameter defaults from `None` to `_UNSET` to match the `Arg` 
class behavior  
   3. The caller now determines `arg_flags` based on `is_required`:
   ```python
      arg_flags = (sanitized_field,) if is_required and not is_bool else ("--" 
+ sanitized_field,)
   ```
   4. Removed all `arg_dest` passing from callers - the `Arg` class handles it 
automatically when not provided
   
   The implementation now works correctly - required non-boolean parameters 
appear as positional arguments:
   ```
   airflowctl connections create connection-id conn-type [OPTIONS]
   ```
   
   I really appreciate you taking the time to guide me through the right 
approach. Your feedback helped me understand how to keep the code simple and 
maintainable. Thank you!


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