(value: str)
| 1214 | |
| 1215 | |
| 1216 | def _split_inline_yaml_list(value: str) -> list[str]: |
| 1217 | items: list[str] = [] |
| 1218 | current = [] |
| 1219 | in_single = False |
| 1220 | in_double = False |
| 1221 | for char in value: |
| 1222 | if char == "'" and not in_double: |
| 1223 | in_single = not in_single |
| 1224 | elif char == '"' and not in_single: |
| 1225 | in_double = not in_double |
| 1226 | elif char == "," and not in_single and not in_double: |
| 1227 | item = _parse_yaml_scalar("".join(current)) |
| 1228 | if item: |
| 1229 | items.append(item) |
| 1230 | current = [] |
| 1231 | continue |
| 1232 | current.append(char) |
| 1233 | item = _parse_yaml_scalar("".join(current)) |
| 1234 | if item: |
| 1235 | items.append(item) |
| 1236 | return items |
| 1237 | |
| 1238 | |
| 1239 | def _parse_yaml_value(value: str) -> str | list[str]: |
no test coverage detected