Corrected some int-type related issues unfolded by Python 3.10. eric7

Mon, 27 Sep 2021 10:50:18 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 27 Sep 2021 10:50:18 +0200
branch
eric7
changeset 8647
cdbce48aded8
parent 8646
4b84216fc8e2
child 8648
c908f66b9d19

Corrected some int-type related issues unfolded by Python 3.10.

eric7/EricWidgets/EricMapWidget.py file | annotate | diff | comparison | revisions
eric7/EricWidgets/EricSpellCheckedTextEdit.py file | annotate | diff | comparison | revisions
eric7/EricWidgets/EricToolButton.py file | annotate | diff | comparison | revisions
eric7/Network/IRC/IrcChannelWidget.py file | annotate | diff | comparison | revisions
eric7/Network/IRC/IrcWidget.py file | annotate | diff | comparison | revisions
--- a/eric7/EricWidgets/EricMapWidget.py	Sun Sep 26 20:21:35 2021 +0200
+++ b/eric7/EricWidgets/EricMapWidget.py	Mon Sep 27 10:50:18 2021 +0200
@@ -308,7 +308,8 @@
         if self._master:
             offset = 0 if slider else 1
             vsb = self._master.verticalScrollBar()
-            return (value - vsb.minimum()) * self.scaleFactor(slider) + offset
+            return int((value - vsb.minimum()) * self.scaleFactor(slider) +
+                       offset)
         else:
             return value
     
--- a/eric7/EricWidgets/EricSpellCheckedTextEdit.py	Sun Sep 26 20:21:35 2021 +0200
+++ b/eric7/EricWidgets/EricSpellCheckedTextEdit.py	Mon Sep 27 10:50:18 2021 +0200
@@ -562,7 +562,7 @@
             @return reference to the current dictionary
             @rtype enchant.Dict
             """
-            return None
+            pass
         
         def setDict(self, spellDict):
             """
@@ -612,6 +612,7 @@
             """
             pass
 
+
 class EricSpellCheckedPlainTextEdit(QPlainTextEdit, SpellCheckMixin):
     """
     Class implementing a QPlainTextEdit with built-in spell checker.
@@ -626,6 +627,7 @@
         QPlainTextEdit.__init__(self, *args)
         SpellCheckMixin.__init__(self)
 
+
 class EricSpellCheckedTextEdit(QTextEdit, SpellCheckMixin):
     """
     Class implementing a QTextEdit with built-in spell checker.
--- a/eric7/EricWidgets/EricToolButton.py	Sun Sep 26 20:21:35 2021 +0200
+++ b/eric7/EricWidgets/EricToolButton.py	Mon Sep 27 10:50:18 2021 +0200
@@ -59,7 +59,7 @@
         
         self.__badgeLabel = QLabel(self)
         font = self.__badgeLabel.font()
-        font.setPixelSize(self.__badgeLabel.height() / 2.5)
+        font.setPixelSize(int(self.__badgeLabel.height() / 2.5))
         self.__badgeLabel.setFont(font)
         self.__badgeLabel.hide()
         
--- a/eric7/Network/IRC/IrcChannelWidget.py	Sun Sep 26 20:21:35 2021 +0200
+++ b/eric7/Network/IRC/IrcChannelWidget.py	Mon Sep 27 10:50:18 2021 +0200
@@ -261,7 +261,7 @@
         self.editTopicButton.hide()
         
         height = self.usersList.height() + self.messages.height()
-        self.splitter.setSizes([height * 0.3, height * 0.7])
+        self.splitter.setSizes([int(height * 0.3), int(height * 0.7)])
         
         self.__initMessagesMenu()
         self.__initUsersMenu()
--- a/eric7/Network/IRC/IrcWidget.py	Sun Sep 26 20:21:35 2021 +0200
+++ b/eric7/Network/IRC/IrcWidget.py	Mon Sep 27 10:50:18 2021 +0200
@@ -74,7 +74,7 @@
             self.channelsWidget.setTabPosition(QTabWidget.TabPosition.South)
         
         height = self.height()
-        self.splitter.setSizes([height * 0.6, height * 0.4])
+        self.splitter.setSizes([int(height * 0.6), int(height * 0.4)])
         
         self.__channelList = []
         self.__channelTypePrefixes = ""

eric ide

mercurial