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

Function _check_members

Tools/c-analyzer/cpython/_analyzer.py:209–230  ·  view source on GitHub ↗
(decl, typedeps, types, knowntypes)

Source from the content-addressed store, hash-verified

207
208
209def _check_members(decl, typedeps, types, knowntypes):
210 if isinstance(typedeps, TypeDeclaration):
211 raise NotImplementedError((decl, typedeps))
212
213 #members = decl.members or () # A forward decl has no members.
214 members = decl.members
215 if not members:
216 # A forward decl has no members, but that shouldn't surface here..
217 raise NotImplementedError(decl)
218 if len(members) != len(typedeps):
219 raise NotImplementedError((decl, typedeps))
220
221 unsupported = []
222 for member, typedecl in zip(members, typedeps):
223 checked = _check_typedep(member, typedecl, types, knowntypes)
224 unsupported.append(checked)
225 if any(None if v is FIXED_TYPE else v for v in unsupported):
226 return unsupported
227 elif FIXED_TYPE in unsupported:
228 return FIXED_TYPE
229 else:
230 return None
231
232
233def _check_typedep(decl, typedecl, types, knowntypes):

Callers 1

_check_unsupportedFunction · 0.85

Calls 3

_check_typedepFunction · 0.85
anyFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…