src/eric7/Preferences/ShortcutsFile.py

branch
eric7
changeset 9278
36448ca469c2
parent 9221
bf71ee032bb4
child 9413
80c06d472826
diff -r 471c5a263d53 -r 36448ca469c2 src/eric7/Preferences/ShortcutsFile.py
--- a/src/eric7/Preferences/ShortcutsFile.py	Thu Jul 28 19:44:54 2022 +0200
+++ b/src/eric7/Preferences/ShortcutsFile.py	Fri Jul 29 16:29:31 2022 +0200
@@ -144,15 +144,16 @@
             )
 
         # step 2: assemble the data structure to be written
-        shortcutsDict = {}
-        # step 2.0: header
-        shortcutsDict["header"] = {
-            "comment": "eric keyboard shortcuts file",
-            "saved": time.strftime("%Y-%m-%d, %H:%M:%S"),
-            "author": Preferences.getUser("Email"),
+        shortcutsDict = {
+            # step 2.0: header
+            "header": {
+                "comment": "eric keyboard shortcuts file",
+                "saved": time.strftime("%Y-%m-%d, %H:%M:%S"),
+                "author": Preferences.getUser("Email"),
+            },
+            # step 2.1: keyboard shortcuts
+            "shortcuts": actionsDict,
         }
-        # step 2.1: keyboard shortcuts
-        shortcutsDict["shortcuts"] = actionsDict
 
         try:
             jsonString = json.dumps(shortcutsDict, indent=2)

eric ide

mercurial