def load_plugin_names(settings):
 seen = set()
 def generate_name(path, maxsplit=0, splits=None):
  if (splits is None):
   splits = (len(path.split('.')) - 1)
  name = '.'.join(path.split('.', (splits - maxsplit))[(-1)].rsplit('.', maxsplit))
  if ((name not in seen) or (maxsplit >= splits)):
   seen.add(name)
   return name
  return generate_name(path, (maxsplit + 1), splits)
 if settings['PLUGINS']:
  return [generate_name(path) for path in settings['PLUGINS']]
 else:
  return ['Annotations']

def load_plugin_names ( settings ) : seen = set ( ) def generate_name ( path , maxsplit = 0 , splits = None ) : if ( splits is None ) : splits = ( len ( path . split ( '.' ) ) - 1 ) name = '.' . join ( path . split ( '.' , ( splits - maxsplit ) ) [ ( - 1 ) ] . rsplit ( '.' , maxsplit ) ) if ( ( name not in seen ) or ( maxsplit >= splits ) ) : seen . add ( name ) return name return generate_name ( path , ( maxsplit + 1 ) , splits ) if settings [ 'PLUGINS' ] : return [ generate_name ( path ) for path in settings [ 'PLUGINS' ] ] else : return [ 'Annotations' ]
generate a unique name for a plugin based on the class name module name and path .