Commit c820d19
committed
Fix argument precedence: Ensure CLI > YAML > Defaults:
- Fixed issue where CLI arguments were mistakenly overridden by YAML values
- Correctly detect CLI-provided arguments by comparing them against argparse’s default values (`parse_args([])`)
- Apply YAML values only if the argument wasn’t explicitly set via CLI
- Ensure default values are used only if both CLI & YAML lack input
- Now, CLI arguments always take priority over YAML and defaults
- YAML values are applied when CLI doesn’t explicitly override them
- Defaults are only used as a last resort
- Fixes YAML being ignored in some cases, ensuring argument merging follows the correct hierarchy1 parent 7efbbc3 commit c820d19
1 file changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
108 | 121 | | |
109 | | - | |
| 122 | + | |
110 | 123 | | |
111 | 124 | | |
112 | 125 | | |
113 | 126 | | |
114 | | - | |
| 127 | + | |
115 | 128 | | |
116 | | - | |
| 129 | + | |
117 | 130 | | |
118 | 131 | | |
119 | 132 | | |
| |||
0 commit comments