def create_finder(project, name, pyname, only_calls=False, imports=True, unsure=None, docs=False, instance=None, in_hierarchy=False, keywords=True):
 pynames_ = set([pyname])
 filters = []
 if only_calls:
  filters.append(CallsFilter())
 if (not imports):
  filters.append(NoImportsFilter())
 if (not keywords):
  filters.append(NoKeywordsFilter())
 if isinstance(instance, pynames.ParameterName):
  for pyobject in instance.get_objects():
   try:
    pynames_.add(pyobject[name])
   except exceptions.AttributeNotFoundError:
    pass
 for pyname in pynames_:
  filters.append(PyNameFilter(pyname))
  if in_hierarchy:
   filters.append(InHierarchyFilter(pyname))
 if unsure:
  filters.append(UnsureFilter(unsure))
 return Finder(project, name, filters=filters, docs=docs)

def create_finder ( project , name , pyname , only_calls = False , imports = True , unsure = None , docs = False , instance = None , in_hierarchy = False , keywords = True ) : pynames_ = set ( [ pyname ] ) filters = [ ] if only_calls : filters . append ( CallsFilter ( ) ) if ( not imports ) : filters . append ( NoImportsFilter ( ) ) if ( not keywords ) : filters . append ( NoKeywordsFilter ( ) ) if isinstance ( instance , pynames . ParameterName ) : for pyobject in instance . get_objects ( ) : try : pynames_ . add ( pyobject [ name ] ) except exceptions . AttributeNotFoundError : pass for pyname in pynames_ : filters . append ( PyNameFilter ( pyname ) ) if in_hierarchy : filters . append ( InHierarchyFilter ( pyname ) ) if unsure : filters . append ( UnsureFilter ( unsure ) ) return Finder ( project , name , filters = filters , docs = docs )
a factory for finder based on the arguments it creates a list of filters .