def find_occurrences(project, resource, offset, unsure=False, resources=None, in_hierarchy=False, task_handle=taskhandle.NullTaskHandle()):
 name = worder.get_name_at(resource, offset)
 this_pymodule = project.get_pymodule(resource)
 (primary, pyname) = rope.base.evaluate.eval_location2(this_pymodule, offset)
 def is_match(occurrence):
  return unsure
 finder = occurrences.create_finder(project, name, pyname, unsure=is_match, in_hierarchy=in_hierarchy, instance=primary)
 if (resources is None):
  resources = project.get_python_files()
 job_set = task_handle.create_jobset('Finding Occurrences', count=len(resources))
 return _find_locations(finder, resources, job_set)

def find_occurrences ( project , resource , offset , unsure = False , resources = None , in_hierarchy = False , task_handle = taskhandle . NullTaskHandle ( ) ) : name = worder . get_name_at ( resource , offset ) this_pymodule = project . get_pymodule ( resource ) ( primary , pyname ) = rope . base . evaluate . eval_location2 ( this_pymodule , offset ) def is_match ( occurrence ) : return unsure finder = occurrences . create_finder ( project , name , pyname , unsure = is_match , in_hierarchy = in_hierarchy , instance = primary ) if ( resources is None ) : resources = project . get_python_files ( ) job_set = task_handle . create_jobset ( 'Finding Occurrences' , count = len ( resources ) ) return _find_locations ( finder , resources , job_set )
return a list of locations if unsure is true .