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

Function _is_private

Lib/enum.py:77–88  ·  view source on GitHub ↗
(cls_name, name)

Source from the content-addressed store, hash-verified

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`
79 pattern = '_%s__' % (cls_name, )
80 pat_len = len(pattern)
81 if (
82 len(name) > pat_len
83 and name.startswith(pattern)
84 and (name[-1] != '_' or name[-2] != '_')
85 ):
86 return True
87 else:
88 return False
89
90def _is_single_bit(num):
91 """

Callers 2

__setitem__Method · 0.85
convert_classFunction · 0.85

Calls 2

lenFunction · 0.85
startswithMethod · 0.45

Tested by

no test coverage detected