def add_default(version=None, overwrite=False):
 plugins = module_loader.all(path_only=True)
 plugins = ((os.path.splitext(os.path.basename(p))[0], p) for p in plugins)
 plugins = (p for p in plugins if (p[0] not in NONMODULE_MODULE_NAMES))
 processed = set()
 diagnostic_messages = []
 for (name, filename) in (info for info in plugins if (info[0] not in processed)):
  try:
   write_metadata(filename, DEFAULT_METADATA, version, overwrite)
  except ParseError as e:
   diagnostic_messages.append(e.args[0])
   continue
  processed.add(name)
 if diagnostic_messages:
  pprint(diagnostic_messages)
 return 0

def add_default ( version = None , overwrite = False ) : plugins = module_loader . all ( path_only = True ) plugins = ( ( os . path . splitext ( os . path . basename ( p ) ) [ 0 ] , p ) for p in plugins ) plugins = ( p for p in plugins if ( p [ 0 ] not in NONMODULE_MODULE_NAMES ) ) processed = set ( ) diagnostic_messages = [ ] for ( name , filename ) in ( info for info in plugins if ( info [ 0 ] not in processed ) ) : try : write_metadata ( filename , DEFAULT_METADATA , version , overwrite ) except ParseError as e : diagnostic_messages . append ( e . args [ 0 ] ) continue processed . add ( name ) if diagnostic_messages : pprint ( diagnostic_messages ) return 0
implement the subcommand to add default metadata to modules add the default metadata to any plugin which lacks it .