eric6/Preferences/ShortcutsFile.py

changeset 8244
ed8cb108b27b
parent 8240
93b8a353c4bf
--- a/eric6/Preferences/ShortcutsFile.py	Thu Apr 15 18:11:24 2021 +0200
+++ b/eric6/Preferences/ShortcutsFile.py	Fri Apr 16 18:03:43 2021 +0200
@@ -26,7 +26,7 @@
     """
     Class representing the shortcuts JSON file.
     """
-    def __init__(self, parent: QObject = None):
+    def __init__(self: "ShortcutsFile", parent: QObject = None) -> None:
         """
         Constructor
         
@@ -35,8 +35,8 @@
         """
         super().__init__(parent)
     
-    def __addActionsToDict(self, category: str, actions: list,
-                           actionsDict: dict):
+    def __addActionsToDict(self: "ShortcutsFile", category: str, actions: list,
+                           actionsDict: dict) -> None:
         """
         Private method to add a list of actions to the actions dictionary.
         
@@ -58,7 +58,8 @@
                         act.alternateShortcut().toString()
                     )
     
-    def writeFile(self, filename: str, helpViewer: HelpViewer = None) -> bool:
+    def writeFile(self: "ShortcutsFile", filename: str,
+                  helpViewer: HelpViewer = None) -> bool:
         """
         Public method to write the shortcuts data to a shortcuts JSON file.
         
@@ -176,7 +177,7 @@
         
         return True
     
-    def readFile(self, filename: str) -> bool:
+    def readFile(self: "ShortcutsFile", filename: str) -> bool:
         """
         Public method to read the shortcuts data from a shortcuts JSON file.
         

eric ide

mercurial