def __init__(self, text_edit):
        """ Create a call tip manager that is attached to the specified Qt
            text edit widget.
        """
        assert isinstance(text_edit, (QtWidgets.QTextEdit, QtWidgets.QPlainTextEdit))
        super().__init__(None, QtCore.Qt.ToolTip)

        text_edit.destroyed.connect(self.deleteLater)

        self._hide_timer = QtCore.QBasicTimer()
        self._text_edit = text_edit

        self.setFont(text_edit.document().defaultFont())
        self.setForegroundRole(QtGui.QPalette.ToolTipText)
        self.setBackgroundRole(QtGui.QPalette.ToolTipBase)
        self.setPalette(QtWidgets.QToolTip.palette())

        self.setAlignment(QtCore.Qt.AlignLeft)
        self.setIndent(1)
        self.setFrameStyle(QtWidgets.QFrame.NoFrame)
        self.setMargin(1 + self.style().pixelMetric(
                QtWidgets.QStyle.PM_ToolTipLabelFrameWidth, None, self))
        self.setWindowOpacity(self.style().styleHint(
                QtWidgets.QStyle.SH_ToolTipLabel_Opacity, None, self, None) / 255.0)
        self.setWordWrap(True)
 Create a call tip manager that is attached to the specified Qt
            text edit widget.
        
angrmanagement/vendor/qtconsole/call_tip_widget.py