Thu, 16 Mar 2017 19:32:33 +0100
Reworked some __IGNORE_WARNING__ comments to be more specific.
--- a/DataViews/CodeMetrics.py Thu Mar 16 19:30:15 2017 +0100 +++ b/DataViews/CodeMetrics.py Thu Mar 16 19:32:33 2017 +0100 @@ -85,7 +85,8 @@ else: self.__addToken(toktype, toktext, srow, scol, line) except tokenize.TokenError as msg: - print("Token Error: {0}".format(str(msg))) # __IGNORE_WARNING__ + print("Token Error: {0}".format(str(msg))) + # __IGNORE_WARNING_M801__ return return
--- a/DebugClients/Python/DebugBase.py Thu Mar 16 19:30:15 2017 +0100 +++ b/DebugClients/Python/DebugBase.py Thu Mar 16 19:32:33 2017 +0100 @@ -357,7 +357,7 @@ if event == 'c_return': return - print('DebugBase.trace_dispatch:' # __IGNORE_WARNING__ + print('DebugBase.trace_dispatch:' # __IGNORE_WARNING_M801__ ' unknown debugging event: ', repr(event)) return self.trace_dispatch
--- a/DebugClients/Python/DebugClientBase.py Thu Mar 16 19:30:15 2017 +0100 +++ b/DebugClients/Python/DebugClientBase.py Thu Mar 16 19:32:33 2017 +0100 @@ -179,7 +179,7 @@ clientCapabilities = DebugClientCapabilities.HasAll # keep these in sync with VariablesViewer.VariableItem.Indicators - Indicators = ("()", "[]", "{:}", "{}") # __IGNORE_WARNING__ + Indicators = ("()", "[]", "{:}", "{}") # __IGNORE_WARNING_M613__ def __init__(self): """ @@ -2005,7 +2005,8 @@ else: # unknown option del args[0] if not args: - print("No program given. Aborting!") # __IGNORE_WARNING__ + print("No program given. Aborting!") + # __IGNORE_WARNING_M801__ else: if not self.noencoding: self.__coding = self.defaultCoding @@ -2046,7 +2047,8 @@ self.connectDebugger(port, remoteAddress, redirect) self.__interact() else: - print("No network port given. Aborting...") # __IGNORE_WARNING__ + print("No network port given. Aborting...") + # __IGNORE_WARNING_M801__ def fork(self): """
--- a/E5Gui/E5ToolBarManager.py Thu Mar 16 19:30:15 2017 +0100 +++ b/E5Gui/E5ToolBarManager.py Thu Mar 16 19:32:33 2017 +0100 @@ -246,7 +246,7 @@ if action.isSeparator(): del action else: - self.__actionToToolBars[id(action)].remove(toolBar) # __IGNORE_WARNING__ + self.__actionToToolBars[id(action)].remove(toolBar) # step 3: set the actions as requested newActionsWithSeparators = []
--- a/E5Network/E5RFC6266.py Thu Mar 16 19:30:15 2017 +0100 +++ b/E5Network/E5RFC6266.py Thu Mar 16 19:32:33 2017 +0100 @@ -42,7 +42,7 @@ super(UniqueNamespace, self).__setitem__(key, value) # RFC 2616 - separator_chars = "()<>@,;:\\\"/[]?={} \t" # __IGNORE_WARNING__ + separator_chars = "()<>@,;:\\\"/[]?={} \t" # __IGNORE_WARNING_M613__ ctl_chars = ''.join(chr(i) for i in range(32)) + chr(127) nontoken_chars = separator_chars + ctl_chars @@ -51,7 +51,7 @@ attr_chars = string.ascii_letters + string.digits + attr_chars_nonalnum # RFC 5987 gives this alternative construction of the token character class - token_chars = attr_chars + "*'%" # __IGNORE_WARNING__ + token_chars = attr_chars + "*'%" # __IGNORE_WARNING_M601__ # Definitions from https://tools.ietf.org/html/rfc2616#section-2.2 # token was redefined from attr_chars to avoid using AnyBut,
--- a/Globals/E5ConfigParser.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Globals/E5ConfigParser.py Thu Mar 16 19:32:33 2017 +0100 @@ -15,7 +15,8 @@ except ImportError: # Py2 part with the compatibility wrapper class try: - from collections import OrderedDict as _default_dict # __IGNORE_WARNING__ + from collections import OrderedDict as _default_dict + # __IGNORE_WARNING_N813__ except ImportError: # fallback for setup.py which hasn't yet built _collections _default_dict = dict
--- a/Helpviewer/Network/NetworkAccessManagerProxy.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Helpviewer/Network/NetworkAccessManagerProxy.py Thu Mar 16 19:32:33 2017 +0100 @@ -11,7 +11,8 @@ from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest try: - from PyQt5.QtNetwork import QSslError # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ + from PyQt5.QtNetwork import QSslError + # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ SSL_AVAILABLE = True except ImportError: SSL_AVAILABLE = False
--- a/Helpviewer/OpenSearch/OpenSearchManager.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Helpviewer/OpenSearch/OpenSearchManager.py Thu Mar 16 19:32:33 2017 +0100 @@ -359,7 +359,8 @@ Public method to restore the default search engines. """ from .OpenSearchReader import OpenSearchReader - from .DefaultSearchEngines import DefaultSearchEngines_rc # __IGNORE_WARNING__ + from .DefaultSearchEngines import DefaultSearchEngines_rc + # __IGNORE_WARNING__ defaultEngineFiles = ["Amazoncom.xml", "Bing.xml", "DeEn_Beolingus.xml", "DuckDuckGo.xml",
--- a/MultiProject/MultiProjectBrowser.py Thu Mar 16 19:30:15 2017 +0100 +++ b/MultiProject/MultiProjectBrowser.py Thu Mar 16 19:32:33 2017 +0100 @@ -118,7 +118,8 @@ parent.removeChild(itm) del itm if parent.childCount() == 0: - top = self.takeTopLevelItem(self.indexOfTopLevelItem(parent)) # __IGNORE_WARNING__ + top = self.takeTopLevelItem(self.indexOfTopLevelItem(parent)) + # __IGNORE_WARNING__ del top def __projectDataChanged(self, project):
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Thu Mar 16 19:32:33 2017 +0100 @@ -2722,7 +2722,8 @@ @return number of unmatched open/close brackets (integer) """ count = 0 - for opening, closing in ['()', '[]', '{}']: # __IGNORE_WARNING__ + for opening, closing in ['()', '[]', '{}']: + # __IGNORE_WARNING_M613__ count += abs(line.count(opening) - line.count(closing)) return count
--- a/Plugins/CheckerPlugins/CodeStyleChecker/translations.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/translations.py Thu Mar 16 19:32:33 2017 +0100 @@ -440,7 +440,7 @@ "copyright notice contains invalid author"), "M121": QCoreApplication.translate( "MiscellaneousChecker", - "blind except: statement"), # __IGNORE_WARNING__ + "blind except: statement"), # __IGNORE_WARNING_M121__ "M131": QCoreApplication.translate( "MiscellaneousChecker", '"{0}" is a Python builtin and is being shadowed; '
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py Thu Mar 16 19:32:33 2017 +0100 @@ -267,7 +267,7 @@ line = detail.lineno error = detail.msg return [{'error': (fn, line, 0, "", error)}] - except: # __IGNORE_WARNING__ + except Exception: pass # pyflakes
--- a/Plugins/CheckerPlugins/SyntaxChecker/pyflakes/messages.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Plugins/CheckerPlugins/SyntaxChecker/pyflakes/messages.py Thu Mar 16 19:32:33 2017 +0100 @@ -454,7 +454,7 @@ Indicates an except block as not the last exception handler. """ message_id = 'F25' - message = 'default \'except:\' must be last' # __IGNORE_WARNING__ + message = 'default \'except:\' must be last' # __IGNORE_WARNING_M121__ class TwoStarredExpressions(Message):
--- a/Plugins/CheckerPlugins/SyntaxChecker/pyflakes/translations.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Plugins/CheckerPlugins/SyntaxChecker/pyflakes/translations.py Thu Mar 16 19:32:33 2017 +0100 @@ -89,7 +89,7 @@ "'continue' not supported inside 'finally' clause"), 'F25': QCoreApplication.translate( 'pyFlakes', - "Default 'except:' must be last"), # __IGNORE_WARNING__ + "Default 'except:' must be last"), # __IGNORE_WARNING_M121__ 'F26': QCoreApplication.translate( 'pyFlakes', "Two starred expressions in assignment"),
--- a/Preferences/ConfigurationPages/EditorHighlightersPage.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Preferences/ConfigurationPages/EditorHighlightersPage.py Thu Mar 16 19:32:33 2017 +0100 @@ -98,7 +98,8 @@ ext, Qt.MatchFlags(Qt.MatchExactly), 0) if itmList: index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) - itm = self.editorLexerList.takeTopLevelItem(index) # __IGNORE_WARNING__ + itm = self.editorLexerList.takeTopLevelItem(index) + # __IGNORE_WARNING__ del itm QTreeWidgetItem(self.editorLexerList, [ext, lexer]) self.editorFileExtEdit.clear() @@ -117,7 +118,8 @@ itmList = self.editorLexerList.selectedItems() if itmList: index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) - itm = self.editorLexerList.takeTopLevelItem(index) # __IGNORE_WARNING__ + itm = self.editorLexerList.takeTopLevelItem(index) + # __IGNORE_WARNING__ del itm self.editorLexerList.clearSelection()
--- a/Project/LexerAssociationDialog.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Project/LexerAssociationDialog.py Thu Mar 16 19:32:33 2017 +0100 @@ -86,7 +86,8 @@ ext, Qt.MatchFlags(Qt.MatchExactly), 0) if itmList: index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) - itm = self.editorLexerList.takeTopLevelItem(index) # __IGNORE_WARNING__ + itm = self.editorLexerList.takeTopLevelItem(index) + # __IGNORE_WARNING__ del itm QTreeWidgetItem(self.editorLexerList, [ext, lexer]) self.editorFileExtEdit.clear() @@ -105,7 +106,8 @@ itmList = self.editorLexerList.selectedItems() if itmList: index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) - itm = self.editorLexerList.takeTopLevelItem(index) # __IGNORE_WARNING__ + itm = self.editorLexerList.takeTopLevelItem(index) + # __IGNORE_WARNING__ del itm self.editorLexerList.clearSelection()
--- a/Project/Project.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Project/Project.py Thu Mar 16 19:32:33 2017 +0100 @@ -2466,7 +2466,8 @@ self.tr("Translation Pattern"), self.tr( "Enter the path pattern for translation files " - "(use '%language%' in place of the language code):"), # __IGNORE_WARNING__ + "(use '%language%' in place of the language code):"), + # __IGNORE_WARNING_M601__ QLineEdit.Normal, tslist[0]) if pattern:
--- a/QScintilla/TypingCompleters/CompleterPython.py Thu Mar 16 19:30:15 2017 +0100 +++ b/QScintilla/TypingCompleters/CompleterPython.py Thu Mar 16 19:32:33 2017 +0100 @@ -53,7 +53,8 @@ self.__tryRX = QRegExp(r"""^[ \t]*try:""") self.__finallyRX = QRegExp(r"""^[ \t]*finally:""") self.__exceptRX = QRegExp(r"""^[ \t]*except """) - self.__exceptcRX = QRegExp(r"""^[ \t]*except:""") # __IGNORE_WARNING__ + self.__exceptcRX = QRegExp(r"""^[ \t]*except:""") + # __IGNORE_WARNING_M121__ self.__whileRX = QRegExp(r"""^[ \t]*while """) self.__forRX = QRegExp(r"""^[ \t]*for """)
--- a/Tools/TRPreviewer.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Tools/TRPreviewer.py Thu Mar 16 19:32:33 2017 +0100 @@ -802,13 +802,13 @@ del wview return - self.rebuildWidgets.connect(wview.buildWidget) # __IGNORE_WARNING__ - wview.installEventFilter(self) # __IGNORE_WARNING__ + self.rebuildWidgets.connect(wview.buildWidget) + wview.installEventFilter(self) - win = self.addSubWindow(wview) # __IGNORE_WARNING__ + win = self.addSubWindow(wview) self.widgets.append(win) - wview.showNormal() # __IGNORE_WARNING__ + wview.showNormal() def eventFilter(self, obj, ev): """
--- a/Utilities/BackgroundService.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Utilities/BackgroundService.py Thu Mar 16 19:32:33 2017 +0100 @@ -60,7 +60,8 @@ port = self.serverPort() ## Note: Need the port if started external in debugger: - print('BackgroundService listening on: {0:d}'.format(port)) # __IGNORE_WARNING__ + print('BackgroundService listening on: {0:d}'.format(port)) + # __IGNORE_WARNING__ for pyName in ['Python', 'Python3']: interpreter = Preferences.getDebugger( pyName + "Interpreter")
--- a/Utilities/__init__.py Thu Mar 16 19:30:15 2017 +0100 +++ b/Utilities/__init__.py Thu Mar 16 19:32:33 2017 +0100 @@ -72,7 +72,8 @@ from UI.Info import Program, Version import Preferences -from Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheck import ( # __IGNORE_WARNING__ +from Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheck import ( + # __IGNORE_WARNING__ normalizeCode) from eric6config import getConfig
--- a/WebBrowser/OpenSearch/OpenSearchManager.py Thu Mar 16 19:30:15 2017 +0100 +++ b/WebBrowser/OpenSearch/OpenSearchManager.py Thu Mar 16 19:32:33 2017 +0100 @@ -422,7 +422,8 @@ Public method to restore the default search engines. """ from .OpenSearchReader import OpenSearchReader - from .DefaultSearchEngines import DefaultSearchEngines_rc # __IGNORE_WARNING__ + from .DefaultSearchEngines import DefaultSearchEngines_rc + # __IGNORE_WARNING__ defaultEngineFiles = ["Amazoncom.xml", "Bing.xml", "DeEn_Beolingus.xml", "DuckDuckGo.xml",
--- a/eric6.py Thu Mar 16 19:30:15 2017 +0100 +++ b/eric6.py Thu Mar 16 19:32:33 2017 +0100 @@ -133,7 +133,8 @@ client.processArgs(sys.argv[1:]) sys.exit(0) elif res < 0: - print("eric6: {0}".format(client.errstr())) # __IGNORE_WARNING__ + print("eric6: {0}".format(client.errstr())) + # __IGNORE_WARNING_M801__ sys.exit(res) @@ -194,7 +195,7 @@ msg = msg.encode(sys.stdout.encoding, 'replace') versionInfo = versionInfo.encode(sys.stdout.encoding, 'replace') warning = notice + msg + versionInfo - print(warning) # __IGNORE_WARNING__ + print(warning) # __IGNORE_WARNING_M801__ else: warning = notice + msg + versionInfo # Escape &<> otherwise it's not visible in the error dialog
--- a/eric6_api.py Thu Mar 16 19:30:15 2017 +0100 +++ b/eric6_api.py Thu Mar 16 19:32:33 2017 +0100 @@ -74,7 +74,7 @@ print(" This option may be repeated multiple times.") print(" -o filename or --output=filename") print(" Write the API information to the named file." - " A '%L' placeholder") # __IGNORE_WARNING__ + " A '%L' placeholder") # __IGNORE_WARNING_M601__ print(" is replaced by the language of the API file" " (see --language).") print(" -p or --private")