MCPcopy Index your code
hub / github.com/python/cpython / _is_internal_class

Function _is_internal_class

Lib/enum.py:69–76  ·  view source on GitHub ↗
(cls_name, obj)

Source from the content-addressed store, hash-verified

67 )
68
69def _is_internal_class(cls_name, obj):
70 # do not use `re` as `re` imports `enum`
71 if not isinstance(obj, type):
72 return False
73 qualname = getattr(obj, '__qualname__', '')
74 s_pattern = cls_name + '.' + getattr(obj, '__name__', '')
75 e_pattern = '.' + s_pattern
76 return qualname == s_pattern or qualname.endswith(e_pattern)
77
78def _is_private(cls_name, name):
79 # do not use `re` as `re` imports `enum`

Callers 1

__setitem__Method · 0.85

Calls 1

endswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…