Fixed some code style issues detected by the new 'return' checker.

Thu, 21 Mar 2019 19:27:42 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 21 Mar 2019 19:27:42 +0100
changeset 6891
93f82da09f22
parent 6890
26c1042f2eec
child 6892
c147620313c5

Fixed some code style issues detected by the new 'return' checker.

DebugClients/Python/BreakpointWatch.py file | annotate | diff | comparison | revisions
DebugClients/Python/DebugBase.py file | annotate | diff | comparison | revisions
DebugClients/Python/FlexCompleter.py file | annotate | diff | comparison | revisions
DebugClients/Python/ThreadExtension.py file | annotate | diff | comparison | revisions
Debugger/StartDialog.py file | annotate | diff | comparison | revisions
E5Network/E5RFC6266.py file | annotate | diff | comparison | revisions
Helpviewer/AdBlock/AdBlockBlockedNetworkReply.py file | annotate | diff | comparison | revisions
Helpviewer/Network/FileReply.py file | annotate | diff | comparison | revisions
Helpviewer/Network/FtpReply.py file | annotate | diff | comparison | revisions
Helpviewer/OfflineStorage/WebDatabasesModel.py file | annotate | diff | comparison | revisions
Helpviewer/OpenSearch/OpenSearchManager.py file | annotate | diff | comparison | revisions
HexEdit/HexEditChunks.py file | annotate | diff | comparison | revisions
HexEdit/HexEditSearchReplaceWidget.py file | annotate | diff | comparison | revisions
PipInterface/Pip.py file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsGit/GitRevisionsSelectionDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsGit/git.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgDiffGenerator.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgRevisionsSelectionDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditConfigDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/RebaseExtension/HgRebaseDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/hg.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/SvnRevisionSelectionDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/SvnRevisionSelectionDialog.py file | annotate | diff | comparison | revisions
Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardRepeatDialog.py file | annotate | diff | comparison | revisions
Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py file | annotate | diff | comparison | revisions
Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardRepeatDialog.py file | annotate | diff | comparison | revisions
Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardRepeatDialog.py file | annotate | diff | comparison | revisions
Preferences/ViewProfileDialog.py file | annotate | diff | comparison | revisions
Preferences/__init__.py file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
QScintilla/Lexers/Lexer.py file | annotate | diff | comparison | revisions
QScintilla/Lexers/LexerPygments.py file | annotate | diff | comparison | revisions
QScintilla/Lexers/LexerTeX.py file | annotate | diff | comparison | revisions
QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
Toolbox/Startup.py file | annotate | diff | comparison | revisions
Utilities/__init__.py file | annotate | diff | comparison | revisions
VCS/ProjectHelper.py file | annotate | diff | comparison | revisions
VCS/VersionControl.py file | annotate | diff | comparison | revisions
ViewManager/ViewManager.py file | annotate | diff | comparison | revisions
WebBrowser/Download/DownloadUtilities.py file | annotate | diff | comparison | revisions
WebBrowser/Network/NetworkManager.py file | annotate | diff | comparison | revisions
WebBrowser/OpenSearch/OpenSearchManager.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/BreakpointWatch.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/DebugClients/Python/BreakpointWatch.py	Thu Mar 21 19:27:42 2019 +0100
@@ -278,6 +278,8 @@
         for b in Watch.watches:
             if b.cond == cond:
                 return b
+        
+        return None
 
     @staticmethod
     def effectiveWatch(frame):
--- a/DebugClients/Python/DebugBase.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/DebugClients/Python/DebugBase.py	Thu Mar 21 19:27:42 2019 +0100
@@ -329,14 +329,14 @@
                 return self.trace_dispatch
             else:
                 # No need to trace this function
-                return
+                return None
         
         if event == 'return':
             if frame == self.returnframe:
                 # Only true if we didn't stopped in this frame, because it's
                 # belonging to the eric debugger.
                 self._set_stopinfo(None, frame.f_back)
-            return
+            return None
         
         if event == 'exception':
             if not self.__skipFrame(frame):
@@ -355,14 +355,14 @@
                     self.stopframe.f_code.co_flags & CO_GENERATOR and
                     arg[0] in (StopIteration, GeneratorExit)):
                 self.user_exception(arg)
-            return
+            return None
 
         if event == 'c_call':
-            return
+            return None
         if event == 'c_exception':
-            return
+            return None
         if event == 'c_return':
-            return
+            return None
         
         print('DebugBase.trace_dispatch:'       # __IGNORE_WARNING_M801__
               ' unknown debugging event: ',
--- a/DebugClients/Python/FlexCompleter.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/DebugClients/Python/FlexCompleter.py	Thu Mar 21 19:27:42 2019 +0100
@@ -177,7 +177,7 @@
 
         m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
         if not m:
-            return
+            return []
         expr, attr = m.group(1, 3)
         try:
             thisobject = eval(expr, self.namespace)
--- a/DebugClients/Python/ThreadExtension.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/DebugClients/Python/ThreadExtension.py	Thu Mar 21 19:27:42 2019 +0100
@@ -131,7 +131,7 @@
         @rtype bool
         """
         if blocking:
-            self.clientLock.acquire()
+            return self.clientLock.acquire()
         else:
             return self.clientLock.acquire(blocking)
     
--- a/Debugger/StartDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Debugger/StartDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -193,6 +193,8 @@
                     self.ui.autoContinueCheckBox.isChecked(),
                     self.ui.forkModeCheckBox.isChecked(),
                     self.ui.forkChildCheckBox.isChecked())
+        else:
+            return (False, False, False, False)
         
     def getRunData(self):
         """
@@ -207,6 +209,8 @@
         if self.dialogType == 1:
             return (self.ui.forkModeCheckBox.isChecked(),
                     self.ui.forkChildCheckBox.isChecked())
+        else:
+            return (False, False)
         
     def getCoverageData(self):
         """
@@ -217,6 +221,8 @@
         """
         if self.dialogType == 2:
             return self.ui.eraseCheckBox.isChecked()
+        else:
+            return False
         
     def getProfilingData(self):
         """
@@ -227,6 +233,8 @@
         """
         if self.dialogType == 3:
             return self.ui.eraseCheckBox.isChecked()
+        else:
+            return False
         
     def __clearHistories(self):
         """
--- a/E5Network/E5RFC6266.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/E5Network/E5RFC6266.py	Thu Mar 21 19:27:42 2019 +0100
@@ -251,6 +251,8 @@
             elif 'filename' in self.assocs:
                 # XXX Reject non-ascii (parsed via qdtext) here?
                 return self.assocs['filename']
+            else:
+                return None
 
         def is_inline(self):
             """
--- a/Helpviewer/AdBlock/AdBlockBlockedNetworkReply.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Helpviewer/AdBlock/AdBlockBlockedNetworkReply.py	Thu Mar 21 19:27:42 2019 +0100
@@ -52,7 +52,7 @@
         @param maxlen maximum number of bytes to read (integer)
         @return string containing the data (string)
         """
-        return None
+        return ""
     
     def abort(self):
         """
--- a/Helpviewer/Network/FileReply.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Helpviewer/Network/FileReply.py	Thu Mar 21 19:27:42 2019 +0100
@@ -158,6 +158,8 @@
             buffer = bytes(self.__content[:len_])
             self.__content.remove(0, len_)
             return buffer
+        else:
+            return b""
     
     def __cssLinkClass(self, icon, size=32):
         """
--- a/Helpviewer/Network/FtpReply.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Helpviewer/Network/FtpReply.py	Thu Mar 21 19:27:42 2019 +0100
@@ -194,6 +194,8 @@
             buffer = bytes(self.__content[:len_])
             self.__content.remove(0, len_)
             return buffer
+        else:
+            return b""
     
     def __doFtpCommands(self):
         """
--- a/Helpviewer/OfflineStorage/WebDatabasesModel.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Helpviewer/OfflineStorage/WebDatabasesModel.py	Thu Mar 21 19:27:42 2019 +0100
@@ -124,6 +124,8 @@
                         db.displayName(), db.name())
                 elif index.column() == 1:
                     return self.__dataString(db.size())
+        
+        return None
     
     def columnCount(self, parent=None):
         """
--- a/Helpviewer/OpenSearch/OpenSearchManager.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Helpviewer/OpenSearch/OpenSearchManager.py	Thu Mar 21 19:27:42 2019 +0100
@@ -168,7 +168,7 @@
         @return flag indicating success (boolean)
         """
         if not url.isValid():
-            return
+            return False
         
         from Helpviewer.HelpWindow import HelpWindow
 
--- a/HexEdit/HexEditChunks.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/HexEdit/HexEditChunks.py	Thu Mar 21 19:27:42 2019 +0100
@@ -351,7 +351,7 @@
         """
         if pos < 0 or pos >= self.__size:
             # position is out of range, do nothing
-            return
+            return False
         
         chunkIdx = self.__getChunkIndex(pos)
         chunk = self.__chunks[chunkIdx]
--- a/HexEdit/HexEditSearchReplaceWidget.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/HexEdit/HexEditSearchReplaceWidget.py	Thu Mar 21 19:27:42 2019 +0100
@@ -242,7 +242,7 @@
         """
         if not self.__havefound or not self.__ui.findtextCombo.currentText():
             self.show()
-            return
+            return False
         
         self.__findBackwards = prev
         ba, txt = self.__getContent()
--- a/PipInterface/Pip.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/PipInterface/Pip.py	Thu Mar 21 19:27:42 2019 +0100
@@ -431,7 +431,7 @@
             if dlg.exec_() == QDialog.Accepted:
                 interpreter = self.getVirtualenvInterpreter(venvName)
                 if not interpreter:
-                    return
+                    return False
                 args = ["-m", "pip", "uninstall", "--yes"] + packages
                 dia = PipDialog(self.tr('Uninstall Packages'))
                 res = dia.startProcess(interpreter, args)
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py	Thu Mar 21 19:27:42 2019 +0100
@@ -208,7 +208,7 @@
         
         if not self.__modified:
             # no need to write
-            return
+            return None
         
         if self.__createBackup:
             # create a backup file before writing any changes
@@ -239,7 +239,8 @@
         except (IOError, UnicodeError) as err:
             # Could not save the file! Skipping it. Reason: {0}
             return ("FWRITE_ERROR", (str(err),))
-        return
+        
+        return None
     
     def __codeMatch(self, code):
         """
@@ -1954,6 +1955,8 @@
         """
         if line < len(self.after):
             return self.after[line]
+        
+        return ""
     
     def getline(self):
         """
@@ -2106,7 +2109,7 @@
         # pycodestyle.py:continuation_line_indentation. All of the comments
         # have been stripped and the 'yield' statements replaced with 'pass'.
         if not self.tokens:
-            return
+            return []
 
         first_row = self.tokens[0][2][0]
         nrows = 1 + self.tokens[-1][2][0] - first_row
--- a/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py	Thu Mar 21 19:27:42 2019 +0100
@@ -516,6 +516,8 @@
                 return DocStyleContext(value, line - 1, "docstring")
             else:
                 return None
+        
+        return None
 
     def __parseDocstring(self, context, what=''):
         """
@@ -613,6 +615,8 @@
                 indent -= 1
             if indent == 0:
                 return kind, value, start, end, raw
+        
+        return None
     
     def __parseMethods(self):
         """
--- a/Plugins/VcsPlugins/vcsGit/GitRevisionsSelectionDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/VcsPlugins/vcsGit/GitRevisionsSelectionDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -210,6 +210,8 @@
             return "HEAD^"
         elif noneButton.isChecked():
             return ""
+        
+        return ""
     
     def getRevisions(self):
         """
--- a/Plugins/VcsPlugins/vcsGit/git.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/VcsPlugins/vcsGit/git.py	Thu Mar 21 19:27:42 2019 +0100
@@ -817,7 +817,7 @@
         while not os.path.isdir(os.path.join(repodir, self.adminDir)):
             repodir = os.path.dirname(repodir)
             if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+                return False
         
         args = self.initCommand("reset")
         args.append("HEAD")
@@ -1525,7 +1525,7 @@
         while not os.path.isdir(os.path.join(repodir, self.adminDir)):
             repodir = os.path.dirname(repodir)
             if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+                return False
         
         args = self.initCommand("cat-file")
         args.append("blob")
@@ -1797,7 +1797,7 @@
         while not os.path.isdir(os.path.join(repodir, self.adminDir)):
             repodir = os.path.dirname(repodir)
             if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+                return False
         
         args = self.initCommand("merge")
         args.append("--abort")
@@ -1922,7 +1922,7 @@
         while not os.path.isdir(os.path.join(repodir, self.adminDir)):
             repodir = os.path.dirname(repodir)
             if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+                return False
         
         from .GitTagDialog import GitTagDialog
         dlg = GitTagDialog(self.gitGetTagsList(repodir), revision, tagName)
--- a/Plugins/VcsPlugins/vcsMercurial/HgDiffGenerator.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgDiffGenerator.py	Thu Mar 21 19:27:42 2019 +0100
@@ -146,7 +146,7 @@
             while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
                 repodir = os.path.dirname(repodir)
                 if os.path.splitdrive(repodir)[1] == os.sep:
-                    return
+                    return False
             
             self.process.kill()
             self.process.setWorkingDirectory(repodir)
--- a/Plugins/VcsPlugins/vcsMercurial/HgRevisionsSelectionDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgRevisionsSelectionDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -271,6 +271,8 @@
             return "."
         elif noneButton.isChecked():
             return ""
+        
+        return ""
     
     def getRevisions(self):
         """
--- a/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditConfigDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditConfigDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -216,6 +216,8 @@
                 return self.branchCombo.currentText()
             elif self.bookmarkButton.isChecked():
                 return self.bookmarkCombo.currentText()
+        
+        return ""
     
     def getData(self):
         """
--- a/Plugins/VcsPlugins/vcsMercurial/RebaseExtension/HgRebaseDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/RebaseExtension/HgRebaseDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -269,6 +269,8 @@
             return bookmarkCombo.currentText()
         elif tipButton and tipButton.isChecked():
             return ""
+        
+        return ""
     
     def getData(self):
         """
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/hg.py	Thu Mar 21 19:27:42 2019 +0100
@@ -903,7 +903,7 @@
         while not os.path.isdir(os.path.join(repodir, self.adminDir)):
             repodir = os.path.dirname(repodir)
             if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+                return False
         
         from .HgTagDialog import HgTagDialog
         dlg = HgTagDialog(self.hgGetTagsList(repodir, withType=True),
@@ -1750,7 +1750,7 @@
             while not os.path.isdir(os.path.join(repodir, self.adminDir)):
                 repodir = os.path.dirname(repodir)
                 if os.path.splitdrive(repodir)[1] == os.sep:
-                    return
+                    return "", ""
             
             process = QProcess()
             process.setWorkingDirectory(repodir)
@@ -2145,7 +2145,7 @@
         while not os.path.isdir(os.path.join(repodir, self.adminDir)):
             repodir = os.path.dirname(repodir)
             if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+                return False
         
         if self.version >= (4, 5, 0):
             args = self.initCommand("merge")
@@ -2625,7 +2625,7 @@
         while not os.path.isdir(os.path.join(repodir, self.adminDir)):
             repodir = os.path.dirname(repodir)
             if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+                return False
         
         res = False
         if not files:
@@ -2850,7 +2850,7 @@
         while not os.path.isdir(os.path.join(repodir, self.adminDir)):
             repodir = os.path.dirname(repodir)
             if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+                return False
         
         from .HgImportDialog import HgImportDialog
         dlg = HgImportDialog()
@@ -3060,7 +3060,7 @@
         while not os.path.isdir(os.path.join(repodir, self.adminDir)):
             repodir = os.path.dirname(repodir)
             if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+                return False
         
         args = self.initCommand("graft")
         args.append(subcommand)
--- a/Plugins/VcsPlugins/vcsPySvn/SvnRevisionSelectionDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/SvnRevisionSelectionDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -82,6 +82,8 @@
         elif prevButton.isChecked():
             return "PREV"
         
+        return ""
+        
     def getRevisions(self):
         """
         Public method to get the revisions.
--- a/Plugins/VcsPlugins/vcsSubversion/SvnRevisionSelectionDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnRevisionSelectionDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -82,6 +82,8 @@
         elif prevButton.isChecked():
             return "PREV"
         
+        return ""
+        
     def getRevisions(self):
         """
         Public method to get the revisions.
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardRepeatDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardRepeatDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -85,3 +85,5 @@
             repsMin = self.lowerSpin.value()
             repsMax = self.upperSpin.value()
             return "{{{0:d},{1:d}}}{2}".format(repsMin, repsMax, minimal)
+        
+        return ""
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -614,6 +614,8 @@
             else:
                 return formatIdentifier
         
+        return ""
+        
     def getCharacters(self):
         """
         Public method to return the character string assembled via the dialog.
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardRepeatDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardRepeatDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -80,3 +80,5 @@
             repsMin = self.lowerSpin.value()
             repsMax = self.upperSpin.value()
             return "{{{0:d},{1:d}}}".format(repsMin, repsMax)
+        
+        return ""
--- a/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardRepeatDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardRepeatDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -90,3 +90,5 @@
             repsMin = self.lowerSpin.value()
             repsMax = self.upperSpin.value()
             return "{{{0:d},{1:d}}}{2}".format(repsMin, repsMax, greedy)
+        
+        return ""
--- a/Preferences/ViewProfileDialog.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Preferences/ViewProfileDialog.py	Thu Mar 21 19:27:42 2019 +0100
@@ -63,7 +63,7 @@
         Public method to retrieve the visibilities configuration.
         
         @return tuple of two lists giving the visibilities of the
-            various parts ( two lists of boolean)
+            various parts (two lists of boolean)
         """
         if self.__layout in ["Toolboxes", "Sidebars"]:
             return (
@@ -80,3 +80,8 @@
                     self.ui.dprtCheckBox.isChecked(),
                 ]
             )
+        
+        return (
+            [True, True, True],         # edit profile
+            [True, True, True],         # debug profile
+        )
--- a/Preferences/__init__.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Preferences/__init__.py	Thu Mar 21 19:27:42 2019 +0100
@@ -1915,6 +1915,8 @@
             else:
                 exts.append(".{0}".format(ext))
         return exts
+    
+    return None
 
 
 def setPython(key, value, prefClass=Prefs):
@@ -3187,6 +3189,8 @@
             encoding = prefClass.sysDefaults[key]
         return encoding
     
+    return None
+    
 
 def setSystem(key, value, prefClass=Prefs):
     """
--- a/QScintilla/Editor.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/QScintilla/Editor.py	Thu Mar 21 19:27:42 2019 +0100
@@ -5684,7 +5684,7 @@
                     files,
                     0, False)
                 if not ok:
-                    return
+                    return ""
             else:
                 fn = files[0]
         else:
--- a/QScintilla/Lexers/Lexer.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/QScintilla/Lexers/Lexer.py	Thu Mar 21 19:27:42 2019 +0100
@@ -254,7 +254,7 @@
         @return space separated list of keywords
         @rtype str or None
         """
-        return None
+        return None     # __IGNORE_WARNING_M831__
     
     def maximumKeywordSet(self):
         """
--- a/QScintilla/Lexers/LexerPygments.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/QScintilla/Lexers/LexerPygments.py	Thu Mar 21 19:27:42 2019 +0100
@@ -522,4 +522,4 @@
         @param kwSet number of the keyword set (integer)
         @return string giving the keywords (string) or None
         """
-        return None
+        return None     # __IGNORE_WARNING_M831__
--- a/QScintilla/Lexers/LexerTeX.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/QScintilla/Lexers/LexerTeX.py	Thu Mar 21 19:27:42 2019 +0100
@@ -208,3 +208,5 @@
                 texKeywords + " " + etexKeywords + " " +
                 pdftexKeywords
             )
+        
+        return None
--- a/QScintilla/QsciScintillaCompat.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/QScintilla/QsciScintillaCompat.py	Thu Mar 21 19:27:42 2019 +0100
@@ -1460,7 +1460,7 @@
                 (Qt.InputMethodQuery)
             @return object containing the requested information
             """
-            return None
+            return None     # __IGNORE_WARNING_M831__
 
     ###########################################################################
     ## interface methods to the mini editor
--- a/Toolbox/Startup.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Toolbox/Startup.py	Thu Mar 21 19:27:42 2019 +0100
@@ -173,7 +173,7 @@
     translations = ("qt", "eric6") + translationFiles
     loc = Preferences.getUILanguage()
     if loc is None:
-        return
+        return ""
 
     if loc == "System":
         loc = QLocale.system().name()
--- a/Utilities/__init__.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/Utilities/__init__.py	Thu Mar 21 19:27:42 2019 +0100
@@ -1256,7 +1256,7 @@
     try:
         names = os.listdir(path)
     except EnvironmentError:
-        return
+        return []
 
     dirs = []
     for name in names:
--- a/VCS/ProjectHelper.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/VCS/ProjectHelper.py	Thu Mar 21 19:27:42 2019 +0100
@@ -147,7 +147,7 @@
             (E5ToolBarManager)
         @return the toolbar generated (QToolBar)
         """
-        return None
+        return None     # __IGNORE_WARNING_M831__
     
     def initBasicToolbar(self, ui, toolbarManager):
         """
--- a/VCS/VersionControl.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/VCS/VersionControl.py	Thu Mar 21 19:27:42 2019 +0100
@@ -556,7 +556,7 @@
         @return flag indicating normal exit (boolean)
         """
         if proc is None:
-            return
+            return False
             
         if workingDir:
             proc.setWorkingDirectory(workingDir)
@@ -799,4 +799,4 @@
         @param project reference to the project object
         @return reference to the monitor thread (QThread)
         """
-        return None
+        return None     # __IGNORE_WARNING_M831__
--- a/ViewManager/ViewManager.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/ViewManager/ViewManager.py	Thu Mar 21 19:27:42 2019 +0100
@@ -4645,7 +4645,7 @@
             newWin, editor = self.getEditor(fn, filetype=filetype,
                                             addNext=addNext, indexes=indexes)
         except (IOError, UnicodeDecodeError):
-            return
+            return None
         
         if newWin:
             self._modificationStatusChanged(editor.isModified(), editor)
--- a/WebBrowser/Download/DownloadUtilities.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/WebBrowser/Download/DownloadUtilities.py	Thu Mar 21 19:27:42 2019 +0100
@@ -90,3 +90,5 @@
     if speed < 1024:
         return QCoreApplication.translate(
             "DownloadUtilities", "{0:.2f} GiB/s").format(speed)
+    
+    return ""
--- a/WebBrowser/Network/NetworkManager.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/WebBrowser/Network/NetworkManager.py	Thu Mar 21 19:27:42 2019 +0100
@@ -83,7 +83,7 @@
             from PyQt5.QtWebEngineCore import QWebEngineUrlScheme
             scheme = QWebEngineUrlScheme(b"eric")
             scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path)
-            scheme.setFlags(QWebEngineUrlScheme.SecureScheme | 
+            scheme.setFlags(QWebEngineUrlScheme.SecureScheme |
                             QWebEngineUrlScheme.ContentSecurityPolicyIgnored)
             QWebEngineUrlScheme.registerScheme(scheme)
         from .EricSchemeHandler import EricSchemeHandler
--- a/WebBrowser/OpenSearch/OpenSearchManager.py	Thu Mar 21 19:26:10 2019 +0100
+++ b/WebBrowser/OpenSearch/OpenSearchManager.py	Thu Mar 21 19:27:42 2019 +0100
@@ -170,7 +170,7 @@
         @return flag indicating success (boolean)
         """
         if not url.isValid():
-            return
+            return False
         
         from WebBrowser.WebBrowserWindow import WebBrowserWindow
 

eric ide

mercurial