MCPcopy Index your code
hub / github.com/RustPython/RustPython / _is_internal_class

Function _is_internal_class

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

Source from the content-addressed store, hash-verified

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

Callers 1

__setitem__Method · 0.85

Calls 3

isinstanceFunction · 0.85
getattrFunction · 0.85
endswithMethod · 0.45

Tested by

no test coverage detected