MCPcopy
hub / github.com/psf/black / CustomSplit

Class CustomSplit

src/black/trans.py:316–338  ·  view source on GitHub ↗

A custom (i.e. manual) string split. A single CustomSplit instance represents a single substring. Examples: Consider the following string: ``` "Hi there friend." " This is a custom" f" string {split}." ``` This string will correspond

Source from the content-addressed store, hash-verified

314
315@dataclass
316class CustomSplit:
317 """A custom (i.e. manual) string split.
318
319 A single CustomSplit instance represents a single substring.
320
321 Examples:
322 Consider the following string:
323 ```
324 "Hi there friend."
325 " This is a custom"
326 f" string {split}."
327 ```
328
329 This string will correspond to the following three CustomSplit instances:
330 ```
331 CustomSplit(False, 16)
332 CustomSplit(False, 17)
333 CustomSplit(True, 16)
334 ```
335 """
336
337 has_prefix: bool
338 break_idx: int
339
340
341CustomSplitMapKey = tuple[StringID, str]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected