Merged with changes of the repo. eric7

Wed, 04 Sep 2024 09:15:41 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 04 Sep 2024 09:15:41 +0200
branch
eric7
changeset 10910
13c8626c5024
parent 10909
4a847e8260c1 (current diff)
parent 10908
ef1b3cd9a6ca (diff)
child 10911
9cccac01156f

Merged with changes of the repo.

--- a/eric7.epj	Wed Sep 04 09:13:59 2024 +0200
+++ b/eric7.epj	Wed Sep 04 09:15:41 2024 +0200
@@ -69,7 +69,7 @@
         "DocstringType": "eric_black",
         "EnabledCheckerCategories": "C, D, E, I, L, M, NO, N, Y, U, W",
         "ExcludeFiles": "*/ThirdParty/*, */Ui_*.py, */Examples/*, */pycodestyle.py, */pyflakes/*, */mccabe.py, */eradicate.py, */ast_unparse.py, */piplicenses.py, */MCUScripts/*, */MicroPython/Tools/*",
-        "ExcludeMessages": "C101,E203,E265,E266,E305,E402,M201,M701,M702,M811,M834,M852,N802,N803,N807,N808,N821,U101,W293,W503,Y119,Y401,Y402",
+        "ExcludeMessages": "M201,C101,E203,E265,E266,E305,E402,M251,M701,M702,M811,M834,M852,N802,N803,N807,N808,N821,U101,W293,W503,Y119,Y401,Y402",
         "FixCodes": "",
         "FixIssues": false,
         "FutureChecker": "",
--- a/src/eric7/MicroPython/Devices/CircuitPythonUpdater/CircupFunctions.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/MicroPython/Devices/CircuitPythonUpdater/CircupFunctions.py	Wed Sep 04 09:15:41 2024 +0200
@@ -37,10 +37,11 @@
         modules on the connected device
     @rtype list of circup.Module
     """
-    if isinstance(device_path, str):
-        backend = circup.DiskBackend(device_path, circup.logger)
-    else:
-        backend = device_path
+    backend = (
+        circup.DiskBackend(device_path, circup.logger)
+        if isinstance(device_path, str)
+        else device_path
+    )
     result = []
     try:
         device_modules = backend.get_device_versions()
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py	Wed Sep 04 09:15:41 2024 +0200
@@ -133,7 +133,7 @@
     ),
     "M200": QCoreApplication.translate(
         "MiscellaneousChecker",
-        "unnecessary {0} comprehension - rewrite using dict.fromkeys()"
+        "unnecessary {0} comprehension - rewrite using dict.fromkeys()",
     ),
     ## Dictionaries with sorted keys
     "M251": QCoreApplication.translate(
--- a/src/eric7/Plugins/VcsPlugins/vcsGit/GitFetchDialog.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/Plugins/VcsPlugins/vcsGit/GitFetchDialog.py	Wed Sep 04 09:15:41 2024 +0200
@@ -39,7 +39,7 @@
         self.__custom = self.tr("<Custom>")
 
         remoteUrlsList = self.__vcs.gitGetRemoteUrlsList(self.__repodir)
-        self.__repos = {name: url for name, url in remoteUrlsList}
+        self.__repos = dict(remoteUrlsList)
 
         self.__okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok)
 
--- a/src/eric7/Plugins/VcsPlugins/vcsGit/GitPullDialog.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/Plugins/VcsPlugins/vcsGit/GitPullDialog.py	Wed Sep 04 09:15:41 2024 +0200
@@ -39,7 +39,7 @@
         self.__custom = self.tr("<Custom>")
 
         remoteUrlsList = self.__vcs.gitGetRemoteUrlsList(self.__repodir)
-        self.__repos = {name: url for name, url in remoteUrlsList}
+        self.__repos = dict(remoteUrlsList)
 
         self.__okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok)
 
--- a/src/eric7/Plugins/VcsPlugins/vcsGit/GitPushDialog.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/Plugins/VcsPlugins/vcsGit/GitPushDialog.py	Wed Sep 04 09:15:41 2024 +0200
@@ -41,7 +41,7 @@
         self.__repodir = repodir
 
         remoteUrlsList = self.__vcs.gitGetRemoteUrlsList(self.__repodir)
-        self.__repos = {name: url for name, url in remoteUrlsList}
+        self.__repos = dict(remoteUrlsList)
 
         remoteBranches = self.__vcs.gitGetBranchesList(self.__repodir, remotes=True)
         self.__remotes = {}
--- a/src/eric7/Plugins/WizardPlugins/EricPluginWizard/PluginWizardDialog.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/Plugins/WizardPlugins/EricPluginWizard/PluginWizardDialog.py	Wed Sep 04 09:15:41 2024 +0200
@@ -147,6 +147,7 @@
                 self.longDescriptionEdit.toPlainText().splitlines()
             ),
             "needsRestart": self.restartCheckBox.isChecked(),
+            "hasCompiledForms": self.compiledFormsCheckBox.isChecked(),
         }
 
         if self.configurationGroup.isChecked():
--- a/src/eric7/Plugins/WizardPlugins/EricPluginWizard/PluginWizardDialog.ui	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/Plugins/WizardPlugins/EricPluginWizard/PluginWizardDialog.ui	Wed Sep 04 09:15:41 2024 +0200
@@ -224,6 +224,19 @@
            </property>
           </widget>
          </item>
+         <item row="1" column="1">
+          <widget class="QCheckBox" name="compiledFormsCheckBox">
+           <property name="toolTip">
+            <string>Select to indicate the presence of compiled forms</string>
+           </property>
+           <property name="text">
+            <string>Contains Compiled Forms</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
         </layout>
        </item>
        <item>
@@ -523,6 +536,7 @@
   <tabstop>autoActivateCheckBox</tabstop>
   <tabstop>deactivateableCheckBox</tabstop>
   <tabstop>restartCheckBox</tabstop>
+  <tabstop>compiledFormsCheckBox</tabstop>
   <tabstop>pluginTypeCombo</tabstop>
   <tabstop>pluginTypeNameEdit</tabstop>
   <tabstop>configurationGroup</tabstop>
@@ -534,6 +548,8 @@
   <tabstop>exeInfoRadioButton</tabstop>
   <tabstop>exeListRadioButton</tabstop>
   <tabstop>apiFilesCheckBox</tabstop>
+  <tabstop>installDependenciesCheckBox</tabstop>
+  <tabstop>clearPrivateDataCheckBox</tabstop>
  </tabstops>
  <resources/>
  <connections>
--- a/src/eric7/Plugins/WizardPlugins/EricPluginWizard/Templates.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/Plugins/WizardPlugins/EricPluginWizard/Templates.py	Wed Sep 04 09:15:41 2024 +0200
@@ -35,6 +35,7 @@
         """{longDescription}"""
     ),
     "needsRestart": {needsRestart},
+    "hasCompiledForms": {hasCompiledForms},
     "pyqtApi": 2,
 }}
 # End-Of-Header
--- a/src/eric7/Plugins/WizardPlugins/EricPluginWizard/Ui_PluginWizardDialog.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/Plugins/WizardPlugins/EricPluginWizard/Ui_PluginWizardDialog.py	Wed Sep 04 09:15:41 2024 +0200
@@ -1,6 +1,6 @@
 # Form implementation generated from reading ui file 'src/eric7/Plugins/WizardPlugins/EricPluginWizard/PluginWizardDialog.ui'
 #
-# Created by: PyQt6 UI code generator 6.7.0
+# Created by: PyQt6 UI code generator 6.7.1
 #
 # WARNING: Any manual changes made to this file will be lost when pyuic6 is
 # run again.  Do not edit this file unless you know what you are doing.
@@ -100,6 +100,10 @@
         self.restartCheckBox = QtWidgets.QCheckBox(parent=self.headerTab)
         self.restartCheckBox.setObjectName("restartCheckBox")
         self.gridLayout_2.addWidget(self.restartCheckBox, 1, 0, 1, 1)
+        self.compiledFormsCheckBox = QtWidgets.QCheckBox(parent=self.headerTab)
+        self.compiledFormsCheckBox.setChecked(True)
+        self.compiledFormsCheckBox.setObjectName("compiledFormsCheckBox")
+        self.gridLayout_2.addWidget(self.compiledFormsCheckBox, 1, 1, 1, 1)
         self.verticalLayout.addLayout(self.gridLayout_2)
         self.ondemandFrame = QtWidgets.QFrame(parent=self.headerTab)
         self.ondemandFrame.setEnabled(False)
@@ -219,7 +223,8 @@
         PluginWizardDialog.setTabOrder(self.longDescriptionEdit, self.autoActivateCheckBox)
         PluginWizardDialog.setTabOrder(self.autoActivateCheckBox, self.deactivateableCheckBox)
         PluginWizardDialog.setTabOrder(self.deactivateableCheckBox, self.restartCheckBox)
-        PluginWizardDialog.setTabOrder(self.restartCheckBox, self.pluginTypeCombo)
+        PluginWizardDialog.setTabOrder(self.restartCheckBox, self.compiledFormsCheckBox)
+        PluginWizardDialog.setTabOrder(self.compiledFormsCheckBox, self.pluginTypeCombo)
         PluginWizardDialog.setTabOrder(self.pluginTypeCombo, self.pluginTypeNameEdit)
         PluginWizardDialog.setTabOrder(self.pluginTypeNameEdit, self.configurationGroup)
         PluginWizardDialog.setTabOrder(self.configurationGroup, self.preferencesKeyEdit)
@@ -230,6 +235,8 @@
         PluginWizardDialog.setTabOrder(self.exeRadioButton, self.exeInfoRadioButton)
         PluginWizardDialog.setTabOrder(self.exeInfoRadioButton, self.exeListRadioButton)
         PluginWizardDialog.setTabOrder(self.exeListRadioButton, self.apiFilesCheckBox)
+        PluginWizardDialog.setTabOrder(self.apiFilesCheckBox, self.installDependenciesCheckBox)
+        PluginWizardDialog.setTabOrder(self.installDependenciesCheckBox, self.clearPrivateDataCheckBox)
 
     def retranslateUi(self, PluginWizardDialog):
         _translate = QtCore.QCoreApplication.translate
@@ -258,6 +265,8 @@
         self.deactivateableCheckBox.setText(_translate("PluginWizardDialog", "Can be deactivated"))
         self.restartCheckBox.setToolTip(_translate("PluginWizardDialog", "Select to indicate a restart is needed when updated"))
         self.restartCheckBox.setText(_translate("PluginWizardDialog", "Needs Restart"))
+        self.compiledFormsCheckBox.setToolTip(_translate("PluginWizardDialog", "Select to indicate the presence of compiled forms"))
+        self.compiledFormsCheckBox.setText(_translate("PluginWizardDialog", "Contains Compiled Forms"))
         self.label_10.setText(_translate("PluginWizardDialog", "Plug-in Type:"))
         self.pluginTypeCombo.setToolTip(_translate("PluginWizardDialog", "Select the plug-in type"))
         self.label_11.setText(_translate("PluginWizardDialog", "Plug-in Type Name:"))
--- a/src/eric7/QScintilla/APIsManager.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/QScintilla/APIsManager.py	Wed Sep 04 09:15:41 2024 +0200
@@ -207,14 +207,11 @@
                 if not os.path.exists(apiDir):
                     # use lower case language
                     apiDir = os.path.join(apisDir, self.__lexer.language().lower())
-                fnames = {f for f in glob.glob(os.path.join(apiDir, "*.api"))}
+                fnames = set(glob.glob(os.path.join(apiDir, "*.api")))
                 # combine with the QScintilla standard behavior
-                fnames |= {
-                    f
-                    for f in glob.glob(
-                        os.path.join(apisDir, self.__lexer.lexer(), "*.api")
-                    )
-                }
+                fnames |= set(
+                    glob.glob(os.path.join(apisDir, self.__lexer.lexer(), "*.api"))
+                )
                 return sorted(fnames)
 
         return []
--- a/src/eric7/QScintilla/Editor.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/QScintilla/Editor.py	Wed Sep 04 09:15:41 2024 +0200
@@ -7399,7 +7399,7 @@
         regExp = re.compile(
             "|".join(Editor.VcsConflictMarkerLineRegExpList), re.MULTILINE
         )
-        matches = [m for m in regExp.finditer(self.text())]
+        matches = list(regExp.finditer(self.text()))
         for match in matches:
             line, _ = self.lineIndexFromPosition(match.start())
             conflictMarkerLines.append(line)
@@ -9635,7 +9635,7 @@
         regExp = re.compile(r"\b{0}\b".format(word))
         startPos = wordEndPos if forward else wordStartPos
 
-        matches = [m for m in regExp.finditer(self.text())]
+        matches = list(regExp.finditer(self.text()))
         if matches:
             if forward:
                 matchesAfter = [m for m in matches if m.start() >= startPos]
--- a/src/eric7/QScintilla/EditorAssembly.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/QScintilla/EditorAssembly.py	Wed Sep 04 09:15:41 2024 +0200
@@ -113,9 +113,7 @@
         """
         Public method to finish the setup of the assembly.
         """
-        splitterWidth = (
-            self.parent().width() - self.__editorSplitter.handleWidth()
-        )
+        splitterWidth = self.parent().width() - self.__editorSplitter.handleWidth()
         outlineWidth = Preferences.getEditor("SourceOutlineWidth")
         self.__editorSplitter.setSizes([splitterWidth - outlineWidth, outlineWidth])
 
--- a/src/eric7/QScintilla/Lexers/SubstyledLexer.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/QScintilla/Lexers/SubstyledLexer.py	Wed Sep 04 09:15:41 2024 +0200
@@ -173,7 +173,7 @@
         editor.SendScintilla(editor.SCI_GETSUBSTYLEBASES, 0, subStyleBases)
         distanceToSecondary = editor.SendScintilla(editor.SCI_DISTANCETOSECONDARYSTYLES)
 
-        subStyleBases = [b for b in bytearray(subStyleBases[:-1])]
+        subStyleBases = list(bytearray(subStyleBases[:-1]))
         if distanceToSecondary:
             subStyleBases.extend(b + distanceToSecondary for b in subStyleBases[:])
         for baseStyleNo in subStyleBases:
--- a/src/eric7/UI/UserInterface.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/UI/UserInterface.py	Wed Sep 04 09:15:41 2024 +0200
@@ -7202,7 +7202,7 @@
             self.__webBrowserProcess = process
 
         else:
-            clientArgs.append("--newtab={0}".format(home))
+            clientArgs.append("--new-tab={0}".format(home))
 
         if clientArgs and self.__webBrowserClient:
             args = WebBrowserArgumentsCreator.createArgparseNamespace(clientArgs)
--- a/src/eric7/Utilities/crypto/py3AES.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/Utilities/crypto/py3AES.py	Wed Sep 04 09:15:41 2024 +0200
@@ -1625,7 +1625,7 @@
     if keysize not in AES.KeySize.values():
         raise ValueError("invalid key size: {0}".format(keysize))
     # create a new iv using random data
-    iv = bytearray([i for i in os.urandom(16)])
+    iv = bytearray(list(os.urandom(16)))
     moo = AESModeOfOperation()
     _mode, _length, ciph = moo.encrypt(data, mode, key, keysize, iv)
     # With padding, the original length does not need to be known. It's a bad
--- a/src/eric7/eric7_fido2.py	Wed Sep 04 09:13:59 2024 +0200
+++ b/src/eric7/eric7_fido2.py	Wed Sep 04 09:15:41 2024 +0200
@@ -124,6 +124,7 @@
 if __name__ == "__main__":
     if os.name == "nt":
         from command_runner.elevate import elevate
+
         elevate(main)
     else:
         main()

eric ide

mercurial