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

Method _get_string_operator_leaves

src/black/trans.py:1915–1924  ·  view source on GitHub ↗
(self, leaves: Iterable[Leaf])

Source from the content-addressed store, hash-verified

1913 return string
1914
1915 def _get_string_operator_leaves(self, leaves: Iterable[Leaf]) -> list[Leaf]:
1916 LL = list(leaves)
1917
1918 string_op_leaves = []
1919 i = 0
1920 while LL[i].type in self.STRING_OPERATORS + [token.NAME]:
1921 prefix_leaf = Leaf(LL[i].type, str(LL[i]).strip())
1922 string_op_leaves.append(prefix_leaf)
1923 i += 1
1924 return string_op_leaves
1925
1926
1927class StringParenWrapper(BaseStringSplitter, CustomSplitMapMixin):

Callers 1

do_transformMethod · 0.95

Calls 2

LeafClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected