(argument: str)
| 34 | |
| 35 | |
| 36 | def looks_like_posix_option(argument: str): |
| 37 | if not argument.startswith("/") or looks_like_windows_path(argument): |
| 38 | return False |
| 39 | |
| 40 | first_value_separator = len(argument) |
| 41 | for separator in (":", "="): |
| 42 | index = argument.find(separator, 1) |
| 43 | if index != -1 and index < first_value_separator: |
| 44 | first_value_separator = index |
| 45 | |
| 46 | first_path_separator = len(argument) |
| 47 | for separator in ("/", "\\"): |
| 48 | index = argument.find(separator, 1) |
| 49 | if index != -1 and index < first_path_separator: |
| 50 | first_path_separator = index |
| 51 | |
| 52 | if first_value_separator < first_path_separator: |
| 53 | return True |
| 54 | return first_path_separator == len(argument) |
| 55 | |
| 56 | |
| 57 | def convert_response_file(response_path: Path): |
no test coverage detected