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

Method add_custom_splits

src/black/trans.py:365–374  ·  view source on GitHub ↗

Custom Split Map Setter Method Side Effects: Adds a mapping from @string to the custom splits @custom_splits.

(
        self, string: str, custom_splits: Iterable[CustomSplit]
    )

Source from the content-addressed store, hash-verified

363 return (id(string), string)
364
365 def add_custom_splits(
366 self, string: str, custom_splits: Iterable[CustomSplit]
367 ) -> None:
368 """Custom Split Map Setter Method
369
370 Side Effects:
371 Adds a mapping from @string to the custom splits @custom_splits.
372 """
373 key = self._get_key(string)
374 self._CUSTOM_SPLIT_MAP[key] = tuple(custom_splits)
375
376 def pop_custom_splits(self, string: str) -> list[CustomSplit]:
377 """Custom Split Map Getter Method

Callers 1

Calls 1

_get_keyMethod · 0.95

Tested by

no test coverage detected