MCPcopy Create free account
hub / github.com/python/mypy / get_str_literal

Function get_str_literal

mypyc/annotate.py:423–426  ·  view source on GitHub ↗
(v: Value)

Source from the content-addressed store, hash-verified

421
422
423def get_str_literal(v: Value) -> str | None:
424 if isinstance(v, LoadLiteral) and isinstance(v.value, str):
425 return v.value
426 return None
427
428
429def get_max_prio(anns: list[Annotation]) -> list[Annotation]:

Callers 1

function_annotationsFunction · 0.85

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…