def find_it():
 with RopeContext() as ctx:
  (_, offset) = env.get_offset_params()
  try:
   occurrences = findit.find_occurrences(ctx.project, ctx.resource, offset)
  except exceptions.BadIdentifierError:
   occurrences = []
 lst = []
 for oc in occurrences:
  lst.append(dict(filename=oc.resource.path, text=(env.lines[(oc.lineno - 1)] if (oc.resource.real_path == env.curbuf.name) else ''), lnum=oc.lineno))
 env.let('loclist._loclist', lst)

def find_it ( ) : with RopeContext ( ) as ctx : ( _ , offset ) = env . get_offset_params ( ) try : occurrences = findit . find_occurrences ( ctx . project , ctx . resource , offset ) except exceptions . BadIdentifierError : occurrences = [ ] lst = [ ] for oc in occurrences : lst . append ( dict ( filename = oc . resource . path , text = ( env . lines [ ( oc . lineno - 1 ) ] if ( oc . resource . real_path == env . curbuf . name ) else '' ) , lnum = oc . lineno ) ) env . let ( 'loclist._loclist' , lst )
find occurrences .