Fixed some code style issues.

Fri, 12 Feb 2021 19:23:28 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 12 Feb 2021 19:23:28 +0100
changeset 8099
522946e53835
parent 8098
36d5f6786a9f
child 8100
a4c231453cbc

Fixed some code style issues.

eric6/Documentation/Help/source.qch file | annotate | diff | comparison | revisions
eric6/Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
eric6/Documentation/Source/eric6.MicroPython.UnknownDevicesDialog.html file | annotate | diff | comparison | revisions
eric6/MicroPython/GenericMicroPythonDevices.py file | annotate | diff | comparison | revisions
eric6/MicroPython/MicroPythonWidget.py file | annotate | diff | comparison | revisions
eric6/MicroPython/UF2FlashDialog.py file | annotate | diff | comparison | revisions
eric6/MicroPython/UnknownDevicesDialog.py file | annotate | diff | comparison | revisions
eric6/Utilities/ModuleParser.py file | annotate | diff | comparison | revisions
Binary file eric6/Documentation/Help/source.qch has changed
--- a/eric6/Documentation/Help/source.qhp	Fri Feb 12 19:16:59 2021 +0100
+++ b/eric6/Documentation/Help/source.qhp	Fri Feb 12 19:23:28 2021 +0100
@@ -18479,7 +18479,6 @@
       <file>eric6.IconEditor.IconSizeDialog.html</file>
       <file>eric6.MicroPython.AddEditDevicesDialog.html</file>
       <file>eric6.MicroPython.CircuitPythonDevices.html</file>
-      <file>eric6.MicroPython.CircuitPythonFirmwareSelectionDialog.html</file>
       <file>eric6.MicroPython.EspBackupRestoreFirmwareDialog.html</file>
       <file>eric6.MicroPython.EspDevices.html</file>
       <file>eric6.MicroPython.EspFirmwareSelectionDialog.html</file>
--- a/eric6/Documentation/Source/eric6.MicroPython.UnknownDevicesDialog.html	Fri Feb 12 19:16:59 2021 +0100
+++ b/eric6/Documentation/Source/eric6.MicroPython.UnknownDevicesDialog.html	Fri Feb 12 19:23:28 2021 +0100
@@ -203,6 +203,18 @@
 <p>
         Private method to save the device data.
 </p>
+<dl>
+<dt>Return:</dt>
+<dd>
+flag indicating a successful save
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl>
 <a NAME="UnknownDevicesDialog.on_buttonBox_accepted" ID="UnknownDevicesDialog.on_buttonBox_accepted"></a>
 <h4>UnknownDevicesDialog.on_buttonBox_accepted</h4>
 <b>on_buttonBox_accepted</b>(<i></i>)
--- a/eric6/MicroPython/GenericMicroPythonDevices.py	Fri Feb 12 19:16:59 2021 +0100
+++ b/eric6/MicroPython/GenericMicroPythonDevices.py	Fri Feb 12 19:23:28 2021 +0100
@@ -166,7 +166,7 @@
                 self.__workspace = self.__findWorkspace(silent=silent)
                 return self.__workspace
         else:
-            super(GenericMicroPythonDevice, self).getWorkspace()
+            return super(GenericMicroPythonDevice, self).getWorkspace()
     
     def __findWorkspace(self, silent=False):
         """
--- a/eric6/MicroPython/MicroPythonWidget.py	Fri Feb 12 19:16:59 2021 +0100
+++ b/eric6/MicroPython/MicroPythonWidget.py	Fri Feb 12 19:23:28 2021 +0100
@@ -346,7 +346,8 @@
                 tuple(d)
                 for d in Preferences.getMicroPython("IgnoredUnknownDevices")
             }
-            uf2Devices = {(*x[2], x[1]) for x in UF2FlashDialog.getFoundDevices()}
+            uf2Devices = {(*x[2], x[1])
+                          for x in UF2FlashDialog.getFoundDevices()}
             newUnknownDevices = (
                 set(unknownDevices) - ignoredUnknown - uf2Devices
             )
--- a/eric6/MicroPython/UF2FlashDialog.py	Fri Feb 12 19:16:59 2021 +0100
+++ b/eric6/MicroPython/UF2FlashDialog.py	Fri Feb 12 19:23:28 2021 +0100
@@ -514,7 +514,7 @@
         @param devices list of detected devices
         @type list of str
         """
-        boardTypes = set(x[0] for x in devices)
+        boardTypes = {x[0] for x in devices}
         
         self.infoLabel.setText(self.tr("Reset Instructions:"))
         
--- a/eric6/MicroPython/UnknownDevicesDialog.py	Fri Feb 12 19:16:59 2021 +0100
+++ b/eric6/MicroPython/UnknownDevicesDialog.py	Fri Feb 12 19:23:28 2021 +0100
@@ -94,6 +94,9 @@
     def __saveDeviceData(self):
         """
         Private method to save the device data.
+        
+        @return flag indicating a successful save
+        @rtype bool
         """
         devices = []
         
--- a/eric6/Utilities/ModuleParser.py	Fri Feb 12 19:16:59 2021 +0100
+++ b/eric6/Utilities/ModuleParser.py	Fri Feb 12 19:23:28 2021 +0100
@@ -741,8 +741,12 @@
                 if conditionalsstack:
                     if thisindent > conditionalsstack[-1]:
                         if not deltaindentcalculated:
-                            deltastack.append(thisindent - conditionalsstack[-1])
-                            deltaindent = reduce(lambda x, y: x + y, deltastack)
+                            deltastack.append(
+                                thisindent - conditionalsstack[-1]
+                            )
+                            deltaindent = reduce(
+                                lambda x, y: x + y, deltastack
+                            )
                             deltaindentcalculated = True
                         thisindent -= deltaindent
                     else:

eric ide

mercurial