Thu, 10 Mar 2016 20:19:33 +0100
Fixed a few code style issues detected by the updated pep8 checker.
diff -r 35fe0232fb8f -r f609a22f43bd DataViews/PyCoverageDialog.py --- a/DataViews/PyCoverageDialog.py Thu Mar 10 19:50:10 2016 +0100 +++ b/DataViews/PyCoverageDialog.py Thu Mar 10 20:19:33 2016 +0100 @@ -198,8 +198,8 @@ try: statements, excluded, missing, readable = \ cover.analysis2(file)[1:] - readableEx = (excluded and self.__format_lines(excluded) - or '') + readableEx = (excluded and self.__format_lines(excluded) or + '') n = len(statements) m = n - len(missing) if n > 0:
diff -r 35fe0232fb8f -r f609a22f43bd DebugClients/Python/DebugClientBase.py --- a/DebugClients/Python/DebugClientBase.py Thu Mar 10 19:50:10 2016 +0100 +++ b/DebugClients/Python/DebugClientBase.py Thu Mar 10 20:19:33 2016 +0100 @@ -1033,8 +1033,8 @@ pass return self.clientCapabilities except ImportError: - return (self.clientCapabilities & - ~DebugClientCapabilities.HasProfiler) + return ( + self.clientCapabilities & ~DebugClientCapabilities.HasProfiler) def write(self, s): """
diff -r 35fe0232fb8f -r f609a22f43bd DebugClients/Python3/DebugBase.py --- a/DebugClients/Python3/DebugBase.py Thu Mar 10 19:50:10 2016 +0100 +++ b/DebugClients/Python3/DebugBase.py Thu Mar 10 20:19:33 2016 +0100 @@ -302,8 +302,8 @@ # skip the internal StopIteration exception (with no traceback) # triggered by a subiterator run with the 'yield from' # statement. - if not (frame.f_code.co_flags & CO_GENERATOR - and arg[0] is StopIteration and arg[2] is None): + if not (frame.f_code.co_flags & CO_GENERATOR and + arg[0] is StopIteration and arg[2] is None): self.user_exception(frame, arg) if self.quitting: raise bdb.BdbQuit @@ -311,9 +311,9 @@ # has set stopframe in a generator by issuing a return command, or a # next/until command at the last statement in the generator before the # exception. - elif (self.stopframe and frame is not self.stopframe - and self.stopframe.f_code.co_flags & CO_GENERATOR - and arg[0] in (StopIteration, GeneratorExit)): + elif (self.stopframe and frame is not self.stopframe and + self.stopframe.f_code.co_flags & CO_GENERATOR and + arg[0] in (StopIteration, GeneratorExit)): self.user_exception(frame, arg) if self.quitting: raise bdb.BdbQuit
diff -r 35fe0232fb8f -r f609a22f43bd DebugClients/Python3/DebugClientBase.py --- a/DebugClients/Python3/DebugClientBase.py Thu Mar 10 19:50:10 2016 +0100 +++ b/DebugClients/Python3/DebugClientBase.py Thu Mar 10 20:19:33 2016 +0100 @@ -1036,8 +1036,8 @@ pass return self.clientCapabilities except ImportError: - return (self.clientCapabilities & - ~DebugClientCapabilities.HasProfiler) + return ( + self.clientCapabilities & ~DebugClientCapabilities.HasProfiler) def write(self, s): """
diff -r 35fe0232fb8f -r f609a22f43bd DocumentationTools/ModuleDocumentor.py --- a/DocumentationTools/ModuleDocumentor.py Thu Mar 10 19:50:10 2016 +0100 +++ b/DocumentationTools/ModuleDocumentor.py Thu Mar 10 20:19:33 2016 +0100 @@ -20,7 +20,7 @@ from Utilities.ModuleParser import RB_SOURCE, Function _signal = re.compile( -r""" + r""" ^@signal [ \t]+ (?P<SignalName1> [a-zA-Z_] \w* [ \t]* \( [^)]* \) @@ -35,7 +35,7 @@ """, re.VERBOSE | re.DOTALL | re.MULTILINE).search _event = re.compile( -r""" + r""" ^@event [ \t]+ (?P<EventName1> [a-zA-Z_] \w* [ \t]* \( [^)]* \)
diff -r 35fe0232fb8f -r f609a22f43bd DocumentationTools/TemplatesListsStyle.py --- a/DocumentationTools/TemplatesListsStyle.py Thu Mar 10 19:50:10 2016 +0100 +++ b/DocumentationTools/TemplatesListsStyle.py Thu Mar 10 20:19:33 2016 +0100 @@ -294,3 +294,6 @@ <td><a style="color:{LinkColor}" href="{{Link}}">{{Name}}</a></td> <td>{{Description}}</td> </tr>''' + +# +# eflag: noqa = E122
diff -r 35fe0232fb8f -r f609a22f43bd DocumentationTools/TemplatesListsStyleCSS.py --- a/DocumentationTools/TemplatesListsStyleCSS.py Thu Mar 10 19:50:10 2016 +0100 +++ b/DocumentationTools/TemplatesListsStyleCSS.py Thu Mar 10 20:19:33 2016 +0100 @@ -273,3 +273,6 @@ <td><a href="{Link}">{Name}</a></td> <td>{Description}</td> </tr>''' + +# +# eflag: noqa = E122
diff -r 35fe0232fb8f -r f609a22f43bd Graphics/PixmapDiagram.py --- a/Graphics/PixmapDiagram.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Graphics/PixmapDiagram.py Thu Mar 10 20:19:33 2016 +0100 @@ -238,8 +238,8 @@ @param scrollBar reference to the scrollbar object (QScrollBar) @param factor factor to adjust by (float) """ - scrollBar.setValue(int(factor * scrollBar.value() - + ((factor - 1) * scrollBar.pageStep() / 2))) + scrollBar.setValue(int(factor * scrollBar.value() + + ((factor - 1) * scrollBar.pageStep() / 2))) def __levelForZoom(self, zoom): """
diff -r 35fe0232fb8f -r f609a22f43bd Helpviewer/Download/DownloadItem.py --- a/Helpviewer/Download/DownloadItem.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Helpviewer/Download/DownloadItem.py Thu Mar 10 20:19:33 2016 +0100 @@ -560,8 +560,8 @@ info = self.tr("{0} of {1} ({2}/sec)\n{3}")\ .format( dataString(self.__bytesReceived), - bytesTotal == -1 and self.tr("?") - or dataString(bytesTotal), + bytesTotal == -1 and self.tr("?") or + dataString(bytesTotal), dataString(int(speed)), remaining) else:
diff -r 35fe0232fb8f -r f609a22f43bd Plugins/AboutPlugin/AboutDialog.py --- a/Plugins/AboutPlugin/AboutDialog.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Plugins/AboutPlugin/AboutDialog.py Thu Mar 10 20:19:33 2016 +0100 @@ -39,7 +39,7 @@ UI.Info.FeatureAddress) authorsText = \ -"""\ + """ Detlev Offenbach Project Manager, Maintainer and German translation @@ -103,7 +103,7 @@ And all the people who reported bugs and made suggestions.""" licenseText = ( -"""Eric is {0} + """Eric is {0} You may use, distribute and copy Eric under the terms of the GNU General Public License as published by the Free Software Foundation,
diff -r 35fe0232fb8f -r f609a22f43bd Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py --- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Thu Mar 10 20:19:33 2016 +0100 @@ -2106,8 +2106,8 @@ start_line, start = t[2] if end_line != start_line: # different row prev_text = self.lines[end_line - 1][end - 1] - if prev_text == ',' or (prev_text not in '{[(' - and text not in '}])'): + if prev_text == ',' or (prev_text not in '{[(' and + text not in '}])'): logical.append(' ') elif end != start: # different column fill = self.lines[end_line - 1][end:start]
diff -r 35fe0232fb8f -r f609a22f43bd Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py --- a/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py Thu Mar 10 20:19:33 2016 +0100 @@ -82,8 +82,8 @@ # adjust individual extension menu entries self.__extensions[extensionName].showExtensionMenu( key, controlled) - if (not self.__extensionMenus[extensionName][key].isEnabled() - and self.__extensionMenus[extensionName][key] + if (not self.__extensionMenus[extensionName][key] + .isEnabled() and self.__extensionMenus[extensionName][key] .isTearOffMenuVisible()): self.__extensionMenus[extensionName][key].hideTearOffMenu()
diff -r 35fe0232fb8f -r f609a22f43bd Preferences/ConfigurationPages/EditorAPIsPage.py --- a/Preferences/ConfigurationPages/EditorAPIsPage.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Preferences/ConfigurationPages/EditorAPIsPage.py Thu Mar 10 20:19:33 2016 +0100 @@ -120,8 +120,8 @@ self.addInstalledApiFileButton.setEnabled(False) self.addPluginApiFileButton.setEnabled( - len(self.pluginManager.getPluginApiFiles(self.currentApiLanguage)) - > 0) + len(self.pluginManager.getPluginApiFiles( + self.currentApiLanguage)) > 0) def __editorGetApisFromApiList(self): """
diff -r 35fe0232fb8f -r f609a22f43bd Preferences/ShortcutsDialog.py --- a/Preferences/ShortcutsDialog.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Preferences/ShortcutsDialog.py Thu Mar 10 20:19:33 2016 +0100 @@ -463,8 +463,8 @@ for index in range(topItem.childCount()): itm = topItem.child(index) if (self.actionButton.isChecked() and - not QRegExp(txt, Qt.CaseInsensitive).indexIn(itm.text(0)) > - -1) or \ + not QRegExp(txt, Qt.CaseInsensitive).indexIn( + itm.text(0)) > -1) or \ (self.shortcutButton.isChecked() and not txt.lower() in itm.text(1).lower() and not txt.lower() in itm.text(2).lower()):
diff -r 35fe0232fb8f -r f609a22f43bd Project/FiletypeAssociationDialog.py --- a/Project/FiletypeAssociationDialog.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Project/FiletypeAssociationDialog.py Thu Mar 10 20:19:33 2016 +0100 @@ -153,8 +153,8 @@ self.deleteAssociationButton.setEnabled(False) else: self.deleteAssociationButton.setEnabled( - self.filetypeAssociationList.selectedItems()[0].text(0) - == txt) + self.filetypeAssociationList.selectedItems()[0] + .text(0) == txt) def transferData(self): """
diff -r 35fe0232fb8f -r f609a22f43bd QScintilla/SearchReplaceWidget.py --- a/QScintilla/SearchReplaceWidget.py Thu Mar 10 19:50:10 2016 +0100 +++ b/QScintilla/SearchReplaceWidget.py Thu Mar 10 20:19:33 2016 +0100 @@ -55,7 +55,7 @@ self.replaceHistory = vm.getSRHistory('replace') self.ui = Ui_ReplaceWidget() whatsThis = self.tr( -r"""<b>Find and Replace</b> + r"""<b>Find and Replace</b> <p>This dialog is used to find some text and replace it with another text. By checking the various checkboxes, the search can be made more specific. The search string might be a regular expression. In a regular expression, @@ -66,7 +66,7 @@ from .Ui_SearchWidget import Ui_SearchWidget self.ui = Ui_SearchWidget() whatsThis = self.tr( -r"""<b>Find</b> + r"""<b>Find</b> <p>This dialog is used to find some text. By checking the various checkboxes, the search can be made more specific. The search string might be a regular expression. In a regular expression, special characters interpreted are:</p> @@ -77,7 +77,7 @@ self.ui.wrapCheckBox.setChecked(True) whatsThis += self.tr( -r"""<table border="0"> + r"""<table border="0"> <tr><td><code>.</code></td><td>Matches any character</td></tr> <tr><td><code>\(</code></td><td>This marks the start of a region for tagging a match.</td></tr> @@ -526,8 +526,8 @@ indexFrom >= boundary[1]) or \ (lineFrom > boundary[0] and lineFrom < boundary[2]) or \ - (lineFrom == boundary[2] - and indexFrom <= boundary[3]): + (lineFrom == boundary[2] and + indexFrom <= boundary[3]): ok = True else: ok = False
diff -r 35fe0232fb8f -r f609a22f43bd Utilities/ClassBrowsers/idlclbr.py --- a/Utilities/ClassBrowsers/idlclbr.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Utilities/ClassBrowsers/idlclbr.py Thu Mar 10 20:19:33 2016 +0100 @@ -25,7 +25,7 @@ SUPPORTED_TYPES = [ClassBrowsers.IDL_SOURCE] _getnext = re.compile( -r""" + r""" (?P<String> " [^"\\\n]* (?: \\. [^"\\\n]*)* " )
diff -r 35fe0232fb8f -r f609a22f43bd Utilities/ClassBrowsers/jsclbr.py --- a/Utilities/ClassBrowsers/jsclbr.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Utilities/ClassBrowsers/jsclbr.py Thu Mar 10 20:19:33 2016 +0100 @@ -130,8 +130,10 @@ @param root root node to visit """ - call = lambda n: getattr(self, "visit_{0}".format(n.type), - self.visit_noop)(n) + def call(n): + getattr(self, "visit_{0}".format(n.type), + self.visit_noop)(n) + call(root) for node in root: self.__visit(node)
diff -r 35fe0232fb8f -r f609a22f43bd Utilities/ClassBrowsers/pyclbr.py --- a/Utilities/ClassBrowsers/pyclbr.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Utilities/ClassBrowsers/pyclbr.py Thu Mar 10 20:19:33 2016 +0100 @@ -29,7 +29,7 @@ SUPPORTED_TYPES = [ClassBrowsers.PY_SOURCE, ClassBrowsers.PTL_SOURCE] _getnext = re.compile( -r""" + r""" (?P<String> \""" [^"\\]* (?: (?: \\. | "(?!"") )
diff -r 35fe0232fb8f -r f609a22f43bd Utilities/ClassBrowsers/rbclbr.py --- a/Utilities/ClassBrowsers/rbclbr.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Utilities/ClassBrowsers/rbclbr.py Thu Mar 10 20:19:33 2016 +0100 @@ -23,7 +23,7 @@ SUPPORTED_TYPES = [ClassBrowsers.RB_SOURCE] _getnext = re.compile( -r""" + r""" (?P<String> =begin .*? =end
diff -r 35fe0232fb8f -r f609a22f43bd Utilities/ModuleParser.py --- a/Utilities/ModuleParser.py Thu Mar 10 19:50:10 2016 +0100 +++ b/Utilities/ModuleParser.py Thu Mar 10 20:19:33 2016 +0100 @@ -58,7 +58,7 @@ _py_getnext = re.compile( -r""" + r""" (?P<String> \""" (?P<StringContents1> [^"\\]* (?: @@ -198,7 +198,7 @@ re.VERBOSE | re.DOTALL | re.MULTILINE).search _rb_getnext = re.compile( -r""" + r""" (?P<Docstring> =begin [ \t]+ edoc (?P<DocstringContents> .*? ) =end )
diff -r 35fe0232fb8f -r f609a22f43bd eric6.e4p --- a/eric6.e4p Thu Mar 10 19:50:10 2016 +0100 +++ b/eric6.e4p Thu Mar 10 20:19:33 2016 +0100 @@ -2203,7 +2203,7 @@ <string>ExcludeMessages</string> </key> <value> - <string>C101, E265, M811, N802, N803, N807, N808, N821, W293</string> + <string>C101, E265, M811, N802, N803, N807, N808, N821, W293, E266, E402</string> </value> <key> <string>FixCodes</string>
diff -r 35fe0232fb8f -r f609a22f43bd install.py --- a/install.py Thu Mar 10 19:50:10 2016 +0100 +++ b/install.py Thu Mar 10 20:19:33 2016 +0100 @@ -440,7 +440,7 @@ os.mkdir(pdir, 0o755) f = open(fname, "w") f.write( -'''# -*- coding: utf-8 -*- + '''# -*- coding: utf-8 -*- """ Package containing the global plugins.