def collect_feature_locations(paths, strict=True):
 locations = []
 for path in paths:
  if os.path.isdir(path):
   for (dirpath, dirnames, filenames) in os.walk(path):
    dirnames.sort()
    for filename in sorted(filenames):
     if filename.endswith('.feature'):
      location = FileLocation(os.path.join(dirpath, filename))
      locations.append(location)
  elif path.startswith('@'):
   locations.extend(FeatureListParser.parse_file(path[1:]))
  else:
   location = FileLocationParser.parse(path)
   if (not location.filename.endswith('.feature')):
    raise InvalidFilenameError(location.filename)
   elif location.exists():
    locations.append(location)
   elif strict:
    raise FileNotFoundError(path)
 return locations

def collect_feature_locations ( paths , strict = True ) : locations = [ ] for path in paths : if os . path . isdir ( path ) : for ( dirpath , dirnames , filenames ) in os . walk ( path ) : dirnames . sort ( ) for filename in sorted ( filenames ) : if filename . endswith ( '.feature' ) : location = FileLocation ( os . path . join ( dirpath , filename ) ) locations . append ( location ) elif path . startswith ( '@' ) : locations . extend ( FeatureListParser . parse_file ( path [ 1 : ] ) ) else : location = FileLocationParser . parse ( path ) if ( not location . filename . endswith ( '.feature' ) ) : raise InvalidFilenameError ( location . filename ) elif location . exists ( ) : locations . append ( location ) elif strict : raise FileNotFoundError ( path ) return locations
collect feature file names by processing list of paths .