Tue, 28 Mar 2017 19:30:36 +0200
Fixed some code style issues.
--- a/ChangeLog Fri Jan 20 19:06:31 2017 +0100 +++ b/ChangeLog Tue Mar 28 19:30:36 2017 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 2.3.3: +- bug fixes + Version 2.3.2: - bug fixes
--- a/PluginProjectPyramid.py Fri Jan 20 19:06:31 2017 +0100 +++ b/PluginProjectPyramid.py Tue Mar 28 19:30:36 2017 +0200 @@ -28,7 +28,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "2.3.2" +version = "2.3.3" className = "ProjectPyramidPlugin" packageName = "ProjectPyramid" shortDescription = "Project support for Pyramid projects." @@ -81,7 +81,7 @@ @param language language to get APIs for (string) @return list of API filenames (list of string) """ - if language in ["Python3", "Python2"]: + if language in ["Python3", "Python2"]: apisDir = \ os.path.join(os.path.dirname(__file__), "ProjectPyramid", "APIs") apis = glob.glob(os.path.join(apisDir, '*.api'))
--- a/PluginPyramid.e4p Fri Jan 20 19:06:31 2017 +0100 +++ b/PluginPyramid.e4p Tue Mar 28 19:30:36 2017 +0200 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Project SYSTEM "Project-5.1.dtd"> <!-- eric project file for project PluginPyramid --> -<!-- Copyright (C) 2016 Detlev Offenbach, detlev@die-offenbachs.de --> +<!-- Copyright (C) 2017 Detlev Offenbach, detlev@die-offenbachs.de --> <Project version="5.1"> <Language>en_US</Language> <Hash>16b809c49f4985b2bd6959b37c5612f6b30e89b4</Hash> @@ -255,6 +255,37 @@ <value> <dict> <key> + <string>BuiltinsChecker</string> + </key> + <value> + <dict> + <key> + <string>bytes</string> + </key> + <value> + <list> + <string>unicode</string> + </list> + </value> + <key> + <string>chr</string> + </key> + <value> + <list> + <string>unichr</string> + </list> + </value> + <key> + <string>str</string> + </key> + <value> + <list> + <string>unicode</string> + </list> + </value> + </dict> + </value> + <key> <string>CopyrightAuthor</string> </key> <value> @@ -276,13 +307,13 @@ <string>ExcludeFiles</string> </key> <value> - <string>*/Ui_*.py</string> + <string>*/Ui_*.py, */*_rc.py</string> </value> <key> <string>ExcludeMessages</string> </key> <value> - <string>E24, E265, N802, N803, N807, N808, N821, W293, E266, C101</string> + <string>C101, E265, E266, E305, E402, M811, N802, N803, N807, N808, N821, W293</string> </value> <key> <string>FixCodes</string> @@ -300,7 +331,7 @@ <string>FutureChecker</string> </key> <value> - <string></string> + <string>unicode_literals</string> </value> <key> <string>HangClosing</string> @@ -315,6 +346,18 @@ <string></string> </value> <key> + <string>LineComplexity</string> + </key> + <value> + <int>20</int> + </value> + <key> + <string>LineComplexityScore</string> + </key> + <value> + <int>10</int> + </value> + <key> <string>MaxCodeComplexity</string> </key> <value>
--- a/ProjectPyramid/DistributionTypeSelectionDialog.py Fri Jan 20 19:06:31 2017 +0100 +++ b/ProjectPyramid/DistributionTypeSelectionDialog.py Tue Mar 28 19:30:36 2017 +0200 @@ -69,10 +69,10 @@ for line in output.splitlines(): line = line.strip() if line.startswith("--formats="): - format, description = line.replace("--formats=", "")\ + fileFormat, description = line.replace("--formats=", "")\ .split(None, 1) itm = QListWidgetItem( - "{0} ({1})".format(format, description), + "{0} ({1})".format(fileFormat, description), self.formatsList) itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable) itm.setCheckState(Qt.Unchecked) @@ -92,8 +92,8 @@ for row in range(self.formatsList.count()): itm = self.formatsList.item(row) if itm.checkState() == Qt.Checked: - format = itm.text().split(None, 1)[0].strip() - if format: - formats.append(format) + fileFormat = itm.text().split(None, 1)[0].strip() + if fileFormat: + formats.append(fileFormat) return formats
--- a/ProjectPyramid/Documentation/source/Plugin_Project_Pyramid.ProjectPyramid.Project.html Fri Jan 20 19:06:31 2017 +0100 +++ b/ProjectPyramid/Documentation/source/Plugin_Project_Pyramid.ProjectPyramid.Project.html Tue Mar 28 19:30:36 2017 +0200 @@ -767,7 +767,7 @@ </table> <a NAME="QProcess.start" ID="QProcess.start"></a> <h4>QProcess.start</h4> -<b>start</b>(<i>cmd, args=[], mode=QProcessPyQt.ReadWrite</i>) +<b>start</b>(<i>cmd, args=None, mode=QProcessPyQt.ReadWrite</i>) <p> Public method to start the given program (cmd) in a new process, if none is already running, passing the command line arguments in args. @@ -784,7 +784,7 @@ </dd> </dl><a NAME="QProcess.startDetached" ID="QProcess.startDetached"></a> <h4>QProcess.startDetached (static)</h4> -<b>startDetached</b>(<i>args=[], path=''</i>) +<b>startDetached</b>(<i>args=None, path=''</i>) <p> Public static method to start the given program (cmd) in a new process, if none is already running, passing the command line arguments in args.
--- a/ProjectPyramid/Project.py Fri Jan 20 19:06:31 2017 +0100 +++ b/ProjectPyramid/Project.py Tue Mar 28 19:30:36 2017 +0200 @@ -47,7 +47,7 @@ """ Class transforming the call arguments in case of gnome-terminal. """ - def start(self, cmd, args=[], mode=QProcessPyQt.ReadWrite): + def start(self, cmd, args=None, mode=QProcessPyQt.ReadWrite): """ Public method to start the given program (cmd) in a new process, if none is already running, passing the command line arguments in args. @@ -56,6 +56,9 @@ @keyparam args list of parameters (list of strings) @keyparam mode access mode (QIODevice.OpenMode) """ + if args is None: + args = [] + if cmd.endswith(('gnome-terminal', 'konsole', 'xfce4-terminal', 'mate-terminal')): if '-e' in args: @@ -66,7 +69,7 @@ super(QProcess, self).start(cmd, args, mode) @staticmethod - def startDetached(cmd, args=[], path=''): + def startDetached(cmd, args=None, path=''): """ Public static method to start the given program (cmd) in a new process, if none is already running, passing the command line arguments in args. @@ -76,6 +79,9 @@ @keyparam path new working directory (string) @return tuple of successful start and process id (boolean, integer) """ + if args is None: + args = [] + if cmd.endswith(('gnome-terminal', 'konsole', 'xfce4-terminal', 'mate-terminal')): if '-e' in args: @@ -500,7 +506,7 @@ if dlg.exec_() == QDialog.Accepted: template = dlg.getTemplateText() - filter = self.tr( + fileFilters = self.tr( "Chameleon Templates (*.pt);;" "Chameleon Text Templates (*.txt);;" "Mako Templates (*.mako);;" @@ -512,7 +518,7 @@ self.__ui, self.tr("New Form"), path, - filter, + fileFilters, None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if fname: @@ -589,8 +595,8 @@ # environment variable not defined if path is not None: dirs = path.split(os.pathsep) - for dir in dirs: - exe = os.path.join(dir, file) + for directory in dirs: + exe = os.path.join(directory, file) if os.access(exe, os.X_OK) and exe not in paths: paths.append(exe)
--- a/ProjectPyramid/PyramidDialog.py Fri Jan 20 19:06:31 2017 +0100 +++ b/ProjectPyramid/PyramidDialog.py Tue Mar 28 19:30:36 2017 +0200 @@ -268,17 +268,17 @@ """ Private slot to send the input to the subversion process. """ - input = self.input.text() - input += os.linesep + inputTxt = self.input.text() + inputTxt += os.linesep if self.passwordCheckBox.isChecked(): self.errors.insertPlainText(os.linesep) self.errors.ensureCursorVisible() else: - self.resultbox.insertPlainText(input) + self.resultbox.insertPlainText(inputTxt) self.resultbox.ensureCursorVisible() - self.proc.write(input) + self.proc.write(inputTxt) self.passwordCheckBox.setChecked(False) self.input.clear()
--- a/ProjectPyramid/PyramidRoutesDialog.py Fri Jan 20 19:06:31 2017 +0100 +++ b/ProjectPyramid/PyramidRoutesDialog.py Tue Mar 28 19:30:36 2017 +0200 @@ -223,14 +223,14 @@ """ Private slot to send the input to the subversion process. """ - input = self.input.text() - input += os.linesep + inputTxt = self.input.text() + inputTxt += os.linesep if self.passwordCheckBox.isChecked(): self.errors.insertPlainText(os.linesep) self.errors.ensureCursorVisible() - self.proc.write(input) + self.proc.write(inputTxt) self.passwordCheckBox.setChecked(False) self.input.clear()