def get_completions_per_type(object_dir):
 if (not object_dir):
  return {}
 result = {'attributes': [], 'modules': [], 'functions': [], 'classes': []}
 type_assign = {types.ClassType: 'classes', types.FunctionType: 'functions', types.MethodType: 'functions', types.ModuleType: 'modules', types.LambdaType: 'functions'}
 for attr in object_dir:
  obj = None
  sig = ''
  try:
   obj = _load_symbol(attr, globals(), locals())
  except Exception as ex:
   logger.error('Could not load symbol: %r', ex)
   return {}
  if (type(obj) in (types.ClassType, types.TypeType)):
   obj = _find_constructor(obj)
  elif isinstance(obj, types.MethodType):
   obj = obj.im_func
  if (not sig):
   sig = attr[(attr.rfind('.') + 1):]
  result[type_assign.get(type(obj), 'attributes')].append(sig)
 return result

def get_completions_per_type ( object_dir ) : if ( not object_dir ) : return { } result = { 'attributes' : [ ] , 'modules' : [ ] , 'functions' : [ ] , 'classes' : [ ] } type_assign = { types . ClassType : 'classes' , types . FunctionType : 'functions' , types . MethodType : 'functions' , types . ModuleType : 'modules' , types . LambdaType : 'functions' } for attr in object_dir : obj = None sig = '' try : obj = _load_symbol ( attr , globals ( ) , locals ( ) ) except Exception as ex : logger . error ( 'Could not load symbol: %r' , ex ) return { } if ( type ( obj ) in ( types . ClassType , types . TypeType ) ) : obj = _find_constructor ( obj ) elif isinstance ( obj , types . MethodType ) : obj = obj . im_func if ( not sig ) : sig = attr [ ( attr . rfind ( '.' ) + 1 ) : ] result [ type_assign . get ( type ( obj ) , 'attributes' ) ] . append ( sig ) return result
return info about function parameters .