Tue, 28 Mar 2017 19:24:25 +0200
Fixed some code style issues.
--- a/ChangeLog Fri Jan 20 19:03:48 2017 +0100 +++ b/ChangeLog Tue Mar 28 19:24:25 2017 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 5.0.3: +- bug fixes + Version 5.0.2: - bug fixes
--- a/PluginDjango.e4p Fri Jan 20 19:03:48 2017 +0100 +++ b/PluginDjango.e4p Tue Mar 28 19:24:25 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 PluginDjango --> -<!-- Copyright (C) 2016 Detlev Offenbach, detlev@die-offenbachs.de --> +<!-- Copyright (C) 2017 Detlev Offenbach, detlev@die-offenbachs.de --> <Project version="5.1"> <Language>en</Language> <Hash>74ebac2e9316db59fdca32e146fa5ae695c66907</Hash> @@ -249,6 +249,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> @@ -270,13 +301,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> @@ -294,7 +325,7 @@ <string>FutureChecker</string> </key> <value> - <string></string> + <string>unicode_literals</string> </value> <key> <string>HangClosing</string> @@ -309,6 +340,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/PluginProjectDjango.py Fri Jan 20 19:03:48 2017 +0100 +++ b/PluginProjectDjango.py Tue Mar 28 19:24:25 2017 +0200 @@ -28,7 +28,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "5.0.2" +version = "5.0.3" className = "ProjectDjangoPlugin" packageName = "ProjectDjango" shortDescription = "Project support for Django projects."
--- a/ProjectDjango/DjangoDumpdataDataDialog.py Fri Jan 20 19:03:48 2017 +0100 +++ b/ProjectDjango/DjangoDumpdataDataDialog.py Tue Mar 28 19:24:25 2017 +0200 @@ -67,6 +67,6 @@ else: excl = [] - format = self.formatCombo.itemData(self.formatCombo.currentIndex()) + dumpFormat = self.formatCombo.itemData(self.formatCombo.currentIndex()) - return appls, excl, format, self.indentationSpinBox.value() + return appls, excl, dumpFormat, self.indentationSpinBox.value()
--- a/ProjectDjango/Documentation/source/Plugin_Project_Django.ProjectDjango.Project.html Fri Jan 20 19:03:48 2017 +0100 +++ b/ProjectDjango/Documentation/source/Plugin_Project_Django.ProjectDjango.Project.html Tue Mar 28 19:24:25 2017 +0200 @@ -1382,7 +1382,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. @@ -1399,7 +1399,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/ProjectDjango/Project.py Fri Jan 20 19:03:48 2017 +0100 +++ b/ProjectDjango/Project.py Tue Mar 28 19:24:25 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: @@ -1208,8 +1214,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) @@ -2611,23 +2617,23 @@ from .DjangoDumpdataDataDialog import DjangoDumpdataDataDialog dlg = DjangoDumpdataDataDialog(self, self.__ui) if dlg.exec_() == QDialog.Accepted: - appls, excls, format, indent = dlg.getData() + appls, excls, dumpFormat, indent = dlg.getData() args = [] args.append(self.__getPythonExecutable()) args.append("manage.py") args.append("dumpdata") - args.append("--format={0}".format(format)) + args.append("--format={0}".format(dumpFormat)) args.append("--indent={0}".format(indent)) for excl in excls: args.append("--exclude={0}".format(excl)) args += appls - if format == "json": + if dumpFormat == "json": fileFilters = self.tr("JSON Files (*.json)") - elif format == "xml": + elif dumpFormat == "xml": fileFilters = self.tr("XML Files (*.xml)") - elif format == "yaml": + elif dumpFormat == "yaml": fileFilters = self.tr("YAML Files (*.yaml)") dia = DjangoDialog(