MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _is_internal_class

Function _is_internal_class

tools/python-3.11.9-amd64/Lib/enum.py:70–77  ·  view source on GitHub ↗
(cls_name, obj)

Source from the content-addressed store, hash-verified

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

Callers 1

__setitem__Method · 0.85

Calls 1

endswithMethod · 0.80

Tested by

no test coverage detected