parameters: (self, cursor_column:int, cursor_line:int, text:str)
docstring: Return a list of :any:`jedi.api.Completions` object from a ``text`` and
          cursor position.
  
          Parameters
          ----------
          cursor_column : int
              column position of the cursor in ``text``, 0-indexed.
          cursor_line : int
              line position of the cursor in ``text``, 0-indexed
          text : str
              text to complete
  
          Debugging
          ---------
  
          If ``IPCompleter.debug`` is ``True`` may return a :any:`_FakeJediCompletion`
          object containing a string with the Jedi debug information attached.
function: def _jedi_matches(self, cursor_column:int, cursor_line:int, text:str):
          """
  
          Return a list of :any:`jedi.api.Completions` object from a ``text`` and
          cursor position.
  
          Parameters
          ----------
          cursor_column : int
              column position of the cursor in ``text``, 0-indexed.
          cursor_line : int
              line position of the cursor in ``text``, 0-indexed
          text : str
              text to complete
  
          Debugging
          ---------
  
          If ``IPCompleter.debug`` is ``True`` may return a :any:`_FakeJediCompletion`
          object containing a string with the Jedi debug information attached.
          """
          namespaces = [self.namespace]
          if self.global_namespace is not None:
              namespaces.append(self.global_namespace)
  
          completion_filter = lambda x:x
          offset = cursor_to_position(text, cursor_line, cursor_column)
          # filter output if we are completing for object members
          if offset:
              pre = text[offset-1]
              if pre == '.':
                  if self.omit__names == 2:
                      completion_filter = lambda c:not c.name.startswith('_')
                  elif self.omit__names == 1:
                      completion_filter = lambda c:not (c.name.startswith('__') and c.name.endswith('__'))
                  elif self.omit__names == 0:
                      completion_filter = lambda x:x
                  else:
                      raise ValueError("Don't understand self.omit__names == {}".format(self.omit__names))
  
          interpreter = jedi.Interpreter(text[:offset], namespaces, column=cursor_column, line=cursor_line + 1)
          try_jedi = True
  
          try:
              # find the first token in the current tree -- if it is a ' or " then we are in a string
              completing_string = False
              try:
                  first_child = next(c for c in interpreter._get_module().tree_node.children if hasattr(c, 'value'))
              except StopIteration:
                  pass
              else:
                  # note the value may be ', ", or it may also be ''' or """, or
                  # in some cases, """what/you/typed..., but all of these are
                  # strings.
                  completing_string = len(first_child.value) > 0 and first_child.value[0] in {"'", '"'}
  
              # if we are in a string jedi is likely not the right candidate for
              # now. Skip it.
              try_jedi = not completing_string
          except Exception as e:
              # many of things can go wrong, we are using private API just don't crash.
              if self.debug:
                  print("Error detecting if completing a non-finished string :", e, '|')
  
          if not try_jedi:
              return []
          try:
              return filter(completion_filter, interpreter.completions())
          except Exception as e:
              if self.debug:
                  return [_FakeJediCompletion('Oops Jedi has crashed, please report a bug with the following:\n"""\n%s\ns"""' % (e))]
              else:
                  return []
function_tokens: def _jedi_matches ( self , cursor_column : int , cursor_line : int , text : str ) : namespaces = [ self . namespace ] if self . global_namespace is not None : namespaces . append ( self . global_namespace ) completion_filter = lambda x : x offset = cursor_to_position ( text , cursor_line , cursor_column ) # filter output if we are completing for object members if offset : pre = text [ offset - 1 ] if pre == '.' : if self . omit__names == 2 : completion_filter = lambda c : not c . name . startswith ( '_' ) elif self . omit__names == 1 : completion_filter = lambda c : not ( c . name . startswith ( '__' ) and c . name . endswith ( '__' ) ) elif self . omit__names == 0 : completion_filter = lambda x : x else : raise ValueError ( "Don't understand self.omit__names == {}" . format ( self . omit__names ) ) interpreter = jedi . Interpreter ( text [ : offset ] , namespaces , column = cursor_column , line = cursor_line + 1 ) try_jedi = True try : # find the first token in the current tree -- if it is a ' or " then we are in a string completing_string = False try : first_child = next ( c for c in interpreter . _get_module ( ) . tree_node . children if hasattr ( c , 'value' ) ) except StopIteration : pass else : # note the value may be ', ", or it may also be ''' or """, or # in some cases, """what/you/typed..., but all of these are # strings. completing_string = len ( first_child . value ) > 0 and first_child . value [ 0 ] in { "'" , '"' } # if we are in a string jedi is likely not the right candidate for # now. Skip it. try_jedi = not completing_string except Exception as e : # many of things can go wrong, we are using private API just don't crash. if self . debug : print ( "Error detecting if completing a non-finished string :" , e , '|' ) if not try_jedi : return [ ] try : return filter ( completion_filter , interpreter . completions ( ) ) except Exception as e : if self . debug : return [ _FakeJediCompletion ( 'Oops Jedi has crashed, please report a bug with the following:\n"""\n%s\ns"""' % ( e ) ) ] else : return [ ]