def __init__(self, console_widget, rows=10):
        """ Create a completion widget that is attached to the specified Qt
            text edit widget.
        """
        assert isinstance(console_widget._control, (QtWidgets.QTextEdit, QtWidgets.QPlainTextEdit))
        super().__init__()

        self._text_edit = console_widget._control
        self._console_widget = console_widget
        self._rows = rows if rows > 0 else 10
        self._text_edit.installEventFilter(self)
        self._sliding_interval = None
        self._justified_items = None

        # Ensure that the text edit keeps focus when widget is displayed.
        self.setFocusProxy(self._text_edit)
 Create a completion widget that is attached to the specified Qt
            text edit widget.
        
angrmanagement/vendor/qtconsole/completion_html.py