def collect_bears(bear_dirs, bear_globs, kinds, log_printer, warn_if_unused_glob=True):
 bears_found = tuple(([] for i in range(len(kinds))))
 bear_globs_with_bears = set()
 for (bear, glob) in icollect_bears(bear_dirs, bear_globs, kinds, log_printer):
  index = kinds.index(_get_kind(bear))
  bears_found[index].append(bear)
  bear_globs_with_bears.add(glob)
 if warn_if_unused_glob:
  _warn_if_unused_glob(log_printer, bear_globs, bear_globs_with_bears, "No bears matching '{}' were found. Make sure you have coala-bears installed or you have typed the name correctly.")
 return bears_found

def collect_bears ( bear_dirs , bear_globs , kinds , log_printer , warn_if_unused_glob = True ) : bears_found = tuple ( ( [ ] for i in range ( len ( kinds ) ) ) ) bear_globs_with_bears = set ( ) for ( bear , glob ) in icollect_bears ( bear_dirs , bear_globs , kinds , log_printer ) : index = kinds . index ( _get_kind ( bear ) ) bears_found [ index ] . append ( bear ) bear_globs_with_bears . add ( glob ) if warn_if_unused_glob : _warn_if_unused_glob ( log_printer , bear_globs , bear_globs_with_bears , "No bears matching '{}' were found. Make sure you have coala-bears installed or you have typed the name correctly." ) return bears_found
collect all bears from bear directories that have a matching kind matching the given globs .