Fix implicit int to float conversion
Implicit conversion to integers using __int__ was deprecated, and now removed in Python 3.10.
@@ -136,7 +136,7 @@ class CompletionWidget(QtWidgets.QListWidget):
if (screen_rect.size().height() + screen_rect.y() -
point.y() - height < 0):
point = text_edit.mapToGlobal(text_edit.cursorRect().topRight())
- point.setY(point.y() - height)
+ point.setY(int(point.y() - height))
w = (self.sizeHintForColumn(0) +
self.verticalScrollBar().sizeHint().width() +
2 * self.frameWidth())
@@ -168,7 +168,7 @@ class CompletionWidget(QtWidgets.QListWidget):
delta = int((point_size * 1.20) ** 0.98)
y = delta - (point_size / 2)
- point.setY(point.y() + y)
+ point.setY(int(point.y() + y))
point = self._text_edit.mapToGlobal(point)
return point
