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

Function has_triple_quotes

src/black/strings.py:38–44  ·  view source on GitHub ↗

Returns: True iff @string starts with three quotation characters.

(string: str)

Source from the content-addressed store, hash-verified

36
37
38def has_triple_quotes(string: str) -> bool:
39 """
40 Returns:
41 True iff @string starts with three quotation characters.
42 """
43 raw_string = string.lstrip(STRING_PREFIX_CHARS)
44 return raw_string[:3] in {'"""', "'''"}
45
46
47def lines_with_leading_tabs_expanded(s: str) -> list[str]:

Callers 4

_validate_msgMethod · 0.90
_validateMethod · 0.90
is_multiline_stringFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…