Split a comma-separated tuple body that may contain MJ_M(...) calls.
(tup: str)
| 146 | |
| 147 | |
| 148 | def _split_csv(tup: str) -> List[str]: |
| 149 | """Split a comma-separated tuple body that may contain MJ_M(...) calls.""" |
| 150 | parts: List[str] = [] |
| 151 | depth = 0 |
| 152 | cur: List[str] = [] |
| 153 | for ch in tup: |
| 154 | if ch == "," and depth == 0: |
| 155 | parts.append("".join(cur).strip()) |
| 156 | cur = [] |
| 157 | continue |
| 158 | if ch == "(": |
| 159 | depth += 1 |
| 160 | elif ch == ")": |
| 161 | depth -= 1 |
| 162 | cur.append(ch) |
| 163 | if cur: |
| 164 | parts.append("".join(cur).strip()) |
| 165 | return parts |
| 166 | |
| 167 | |
| 168 | def _parse_pointer_entry(raw: str) -> Optional[Dict[str, Any]]: |
no outgoing calls
no test coverage detected