Fury0508 commented on PR #60193:
URL: https://github.com/apache/airflow/pull/60193#issuecomment-3721301612
Hi @bugraoz93,
Thank you for the feedback and for your patience with a first-time
contributor!
You're absolutely right about the AI traces - I use Cursor IDE which has AI
autocomplete, and I didn't catch that it added comments like `# NEW PARAMETER`.
I should have reviewed more carefully before submitting. I've now addressed all
your feedback:
1. Removed unnecessary comments (including the AI-generated ones)
2. Simplified the logic using a one-liner conditional when calling
`_create_arg`:
```python
arg_flags = (sanitized_field,) if is_required and not is_bool else ("--"
+ sanitized_field,)
```
3. Simplified `_create_arg` to just check if flags start with `-` rather
than having is_required parameter
4. Added unit test `test_required_params_are_positional` to verify the
behaviour
I've verified the help output shows required parameters as positional
arguments correctly. I understand now to be more careful about reviewing my
code before pushing, especially when using AI-assisted tools.
Let me know if there are any other changes needed!
--
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]