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

Method contains_standalone_comments

src/black/lines.py:241–247  ·  view source on GitHub ↗

If so, needs to be split before emitting.

(self)

Source from the content-addressed store, hash-verified

239 )
240
241 def contains_standalone_comments(self) -> bool:
242 """If so, needs to be split before emitting."""
243 for leaf in self.leaves:
244 if leaf.type == STANDALONE_COMMENT:
245 return True
246
247 return False
248
249 def contains_implicit_multiline_string_with_comments(self) -> bool:
250 """Check if we have an implicit multiline string with comments on the line"""

Callers 3

is_line_short_enoughFunction · 0.80
transform_lineFunction · 0.80
standalone_comment_splitFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected