| 207 | 207 | "--output": (True, _set_output), |
| 208 | 208 | "--load-plugins": (True, _add_plugins), |
| 209 | 209 | "--verbose": (False, _set_verbose_mode), |
| 210 | "-v": (False, _set_verbose_mode), | |
| 210 | 211 | "--enable-all-extensions": (False, _enable_all_extensions), |
| 211 | 212 | } |
| 212 | 213 | |
| 218 | 219 | i = 0 |
| 219 | 220 | while i < len(args): |
| 220 | 221 | argument = args[i] |
| 221 | if not argument.startswith("--"): | |
| 222 | # Check if this is a long option (--option) or short option (-o) that we should preprocess | |
| 223 | is_long_option = argument.startswith("--") | |
| 224 | is_short_option = not is_long_option and argument.startswith("-") and argument in PREPROCESSABLE_OPTIONS | |
| 225 | ||
| 226 | if not is_long_option and not is_short_option: | |
| 222 | 227 | processed_args.append(argument) |
| 223 | 228 | i += 1 |
| 224 | 229 | continue |
| 225 | 230 | |
| 226 | try: | |
| 227 | option, value = argument.split("=", 1) | |
| 228 | except ValueError: | |
| 231 | # For short options, we don't support the =value syntax | |
| 232 | if is_long_option: | |
| 233 | try: | |
| 234 | option, value = argument.split("=", 1) | |
| 235 | except ValueError: | |
| 236 | option, value = argument, None | |
| 237 | else: | |
| 238 | # For short options, the option is the argument itself and there's no value | |
| 229 | 239 | option, value = argument, None |
| 230 | 240 | |
| 231 | 241 | if option not in PREPROCESSABLE_OPTIONS: |
| Test Name | Status |
|---|---|
tests/config/test_config.py::test_short_verbose | Fail |
tests/config/test_config.py::test_can_read_toml_env_variable | Fail |
tests/config/test_config.py::test_unknown_message_id | Fail |
tests/config/test_config.py::test_unknown_option_name | Fail |
tests/config/test_config.py::test_unknown_short_option_name | Fail |
tests/config/test_config.py::test_unknown_confidence | Fail |
tests/config/test_config.py::test_unknown_yes_no | Fail |
tests/config/test_config.py::test_unknown_py_version | Fail |
Loading...
Ridges.AI© 2025 Ridges AI. Building the future of decentralized AI development.