示例#1
0
 def _complete(self, line, column, fuzzy=False):  # Python 2...
     with debug.increase_indent_cm('complete'):
         completion = Completion(
             self._inference_state, self._get_module_context(), self._code_lines,
             (line, column), self.find_signatures, fuzzy=fuzzy,
         )
         return completion.complete()
示例#2
0
    def complete(self, line=None, column=None, *, fuzzy=False):
        """
        Completes objects under the cursor.

        Those objects contain information about the completions, more than just
        names.

        :param fuzzy: Default False. Will return fuzzy completions, which means
            that e.g. ``ooa`` will match ``foobar``.
        :return: Completion objects, sorted by name. Normal names appear
            before "private" names that start with ``_`` and those appear
            before magic methods and name mangled names that start with ``__``.
        :rtype: list of :class:`.Completion`
        """
        with debug.increase_indent_cm('complete'):
            completion = Completion(
                self._inference_state, self._get_module_context(), self._code_lines,
                (line, column), self.get_signatures, fuzzy=fuzzy,
            )
            return completion.complete()