@env.catch_exceptions
def complete_check():
 (row, column) = env.cursor
 line = env.lines[(row - 1)]
 word_finder = worder.Worder(line, True)
 (parent, name, _) = word_finder.get_splitted_primary_before((column - 1))
 if parent:
  return False
 with RopeContext() as ctx:
  modules = ctx.importer.get_modules(name)
  if (not modules):
   return False
  if (name in ctx.project.pycore.resource_to_pyobject(ctx.resource)):
   return False
  if (not env.user_confirm(('Import %s?' % name), True)):
   return False
  if (len(modules) == 1):
   _insert_import(name, modules[0], ctx)
  else:
   module = env.user_input_choices('With module to import:', *modules)
   if module:
    _insert_import(name, module, ctx)

@ env . catch_exceptions def complete_check ( ) : ( row , column ) = env . cursor line = env . lines [ ( row - 1 ) ] word_finder = worder . Worder ( line , True ) ( parent , name , _ ) = word_finder . get_splitted_primary_before ( ( column - 1 ) ) if parent : return False with RopeContext ( ) as ctx : modules = ctx . importer . get_modules ( name ) if ( not modules ) : return False if ( name in ctx . project . pycore . resource_to_pyobject ( ctx . resource ) ) : return False if ( not env . user_confirm ( ( 'Import %s?' % name ) , True ) ) : return False if ( len ( modules ) == 1 ) : _insert_import ( name , modules [ 0 ] , ctx ) else : module = env . user_input_choices ( 'With module to import:' , * modules ) if module : _insert_import ( name , module , ctx )
function description .