(array_format: ArrayFormat, array_index: int)
| 63 | |
| 64 | |
| 65 | def _array_suffix(array_format: ArrayFormat, array_index: int) -> str: |
| 66 | if array_format == "brackets": |
| 67 | return "[]" |
| 68 | if array_format == "indices": |
| 69 | return f"[{array_index}]" |
| 70 | if array_format == "repeat" or array_format == "comma": |
| 71 | # Both repeat the bare field name for each file part; there is no |
| 72 | # meaningful way to comma-join binary parts. |
| 73 | return "" |
| 74 | raise NotImplementedError( |
| 75 | f"Unknown array_format value: {array_format}, choose from {', '.join(get_args(ArrayFormat))}" |
| 76 | ) |
| 77 | |
| 78 | |
| 79 | def _extract_items( |
no test coverage detected