MCPcopy Create free account
hub / github.com/numpy/numpy / find_unexpected_members

Function find_unexpected_members

numpy/tests/test_public_api.py:416–432  ·  view source on GitHub ↗
(mod_name)

Source from the content-addressed store, hash-verified

414 """
415
416 def find_unexpected_members(mod_name):
417 members = []
418 module = importlib.import_module(mod_name)
419 if hasattr(module, '__all__'):
420 objnames = module.__all__
421 else:
422 objnames = dir(module)
423
424 for objname in objnames:
425 if not objname.startswith('_'):
426 fullobjname = mod_name + '.' + objname
427 if isinstance(getattr(module, objname), types.ModuleType):
428 if is_unexpected(fullobjname):
429 if fullobjname not in SKIP_LIST_2:
430 members.append(fullobjname)
431
432 return members
433
434 unexpected_members = find_unexpected_members("numpy")
435 for modname in PUBLIC_MODULES:

Callers 1

Calls 2

is_unexpectedFunction · 0.85
startswithMethod · 0.80

Tested by

no test coverage detected