MCPcopy
hub / github.com/python/mypy / is_private

Function is_private

mypy/checker.py:9618–9620  ·  view source on GitHub ↗

Check if node is private to class definition.

(node_name: str)

Source from the content-addressed store, hash-verified

9616
9617
9618def is_private(node_name: str) -> bool:
9619 """Check if node is private to class definition."""
9620 return node_name.startswith("__") and not node_name.endswith("__")
9621
9622
9623def is_string_literal(typ: Type) -> bool:

Calls 2

startswithMethod · 0.45
endswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…