MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / classlist

Function classlist

api-docs/source/conf.py:68–79  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

66 return sorted(set((basename + name, member) for (name, member) in modules if module.__name__ in inspect.getmodule(member).__name__ and name not in moduleblacklist))
67
68def classlist(module):
69 members = inspect.getmembers(module, inspect.isclass)
70 classblacklist = ['builtins']
71 if module.__name__ != "binaryninja.enums":
72 # This is an abomination of a sort key, but it fixes the issue with collab or other nested namespaces
73 members = sorted([x for x in members if type(x[1]) != binaryninja.enum.EnumMeta and x[1].__module__ not in classblacklist], key=lambda x: str(x[1].__module__ + "." + x[1].__name__))
74 members.extend(fnlist(module))
75
76 def in_mod(member):
77 return module.__name__ in inspect.getmodule(member).__name__
78
79 return ((name, member) for (name, member) in members if not name[0].startswith("_") and in_mod(member))
80
81def fnlist(module):
82 return [x for x in inspect.getmembers(module, inspect.isfunction) if x[1].__module__ == module]

Callers 1

generaterstFunction · 0.85

Calls 2

fnlistFunction · 0.85
in_modFunction · 0.85

Tested by

no test coverage detected