Tue, 27 Jul 2010 12:49:37 +0200
Did some more string format conversions.
--- a/PluginManager/PluginInstallDialog.py Tue Jul 27 12:44:19 2010 +0200 +++ b/PluginManager/PluginInstallDialog.py Tue Jul 27 12:49:37 2010 +0200 @@ -379,8 +379,8 @@ QApplication.processEvents() prog += 1 if name == pluginFileName or \ - name.startswith("%s/" % packageName) or \ - name.startswith("%s\\" % packageName): + name.startswith("{0}/".format(packageName)) or \ + name.startswith("{0}\\".format(packageName)): outname = name.replace("/", os.sep) outname = os.path.join(destination, outname) if outname.endswith("/") or outname.endswith("\\"): @@ -489,11 +489,11 @@ if packageDir and os.path.exists(packageDir): shutil.rmtree(packageDir) - fnameo = "%so" % pluginFile + fnameo = "{0}o".format(pluginFile) if os.path.exists(fnameo): os.remove(fnameo) - fnamec = "%sc" % pluginFile + fnamec = "{0}c".format(pluginFile) if os.path.exists(fnamec): os.remove(fnamec)
--- a/PluginManager/PluginManager.py Tue Jul 27 12:44:19 2010 +0200 +++ b/PluginManager/PluginManager.py Tue Jul 27 12:49:37 2010 +0200 @@ -288,7 +288,7 @@ @param reload_ flag indicating to reload the module (boolean) """ try: - fname = "%s.py" % os.path.join(directory, name) + fname = "{0}.py".format(os.path.join(directory, name)) module = imp.load_source(name, fname) if not hasattr(module, "autoactivate"): module.error = \ @@ -330,7 +330,7 @@ @param directory name of the plugin directory (string) @return flag indicating success (boolean) """ - fname = "%s.py" % os.path.join(directory, name) + fname = "{0}.py".format(os.path.join(directory, name)) if name in self.__onDemandActiveModules and \ self.__onDemandActiveModules[name].eric5PluginModuleFilename == fname: # cannot unload an ondemand plugin, that is in use
--- a/PluginManager/PluginUninstallDialog.py Tue Jul 27 12:44:19 2010 +0200 +++ b/PluginManager/PluginUninstallDialog.py Tue Jul 27 12:49:37 2010 +0200 @@ -61,7 +61,7 @@ pluginNames = sorted(self.__pluginManager.getPluginModules(pluginDirectory)) self.pluginNameCombo.clear() for pluginName in pluginNames: - fname = "%s.py" % os.path.join(pluginDirectory, pluginName) + fname = "{0}.py".format(os.path.join(pluginDirectory, pluginName)) self.pluginNameCombo.addItem(pluginName, fname) self.buttonBox.button(QDialogButtonBox.Ok)\ .setEnabled(self.pluginNameCombo.currentText() != "") @@ -129,11 +129,11 @@ if packageDir and os.path.exists(packageDir): shutil.rmtree(packageDir) - fnameo = "%so" % pluginFile + fnameo = "{0}o".format(pluginFile) if os.path.exists(fnameo): os.remove(fnameo) - fnamec = "%sc" % pluginFile + fnamec = "{0}c".format(pluginFile) if os.path.exists(fnamec): os.remove(fnamec)
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Tue Jul 27 12:44:19 2010 +0200 +++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Tue Jul 27 12:49:37 2010 +0200 @@ -104,7 +104,7 @@ elif os.path.isdir(fn): files = [] for ext in Preferences.getPython("Python3Extensions"): - files.extend(Utilities.direntries(fn, 1, '*%s' % ext, 0)) + files.extend(Utilities.direntries(fn, 1, '*{0}'.format(ext), 0)) else: files = [fn] files = [f for f in files \
--- a/Plugins/CheckerPlugins/Tabnanny/Tabnanny.py Tue Jul 27 12:44:19 2010 +0200 +++ b/Plugins/CheckerPlugins/Tabnanny/Tabnanny.py Tue Jul 27 12:49:37 2010 +0200 @@ -107,7 +107,7 @@ try: text = Utilities.readEncodedFile(file)[0] except (UnicodeError, IOError) as msg: - return (True, file, "1", "Error: %s" % str(msg)) + return (True, file, "1", "Error: {0}".format(str(msg))) # convert eols text = Utilities.convertLineEnds(text, os.linesep) @@ -117,10 +117,10 @@ process_tokens(tokenize.generate_tokens(source.readline)) except tokenize.TokenError as msg: - return (True, file, "1", "Token Error: %s" % str(msg)) + return (True, file, "1", "Token Error: {0}".format(str(msg))) except IndentationError as err: - return (True, file, err.lineno, "Indentation Error: %s" % str(err.msg)) + return (True, file, err.lineno, "Indentation Error: {0}".format(str(err.msg))) except NannyNag as nag: badline = nag.get_lineno() @@ -128,7 +128,7 @@ return (True, file, str(badline), line) except Exception as err: - return (True, file, "1", "Unspecific Error: %s" % str(err)) + return (True, file, "1", "Unspecific Error: {0}".format(str(err))) return (False, None, None, None)
--- a/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py Tue Jul 27 12:44:19 2010 +0200 +++ b/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py Tue Jul 27 12:49:37 2010 +0200 @@ -72,7 +72,7 @@ elif os.path.isdir(fn): files = [] for ext in Preferences.getPython("Python3Extensions"): - files.extend(Utilities.direntries(fn, 1, '*%s' % ext, 0)) + files.extend(Utilities.direntries(fn, 1, '*{0}'.format(ext), 0)) else: files = [fn] files = [f for f in files \
--- a/Plugins/DocumentationPlugins/Ericapi/EricapiConfigDialog.py Tue Jul 27 12:44:19 2010 +0200 +++ b/Plugins/DocumentationPlugins/Ericapi/EricapiConfigDialog.py Tue Jul 27 12:49:37 2010 +0200 @@ -136,7 +136,7 @@ if self.parameters['ignoreFilePatterns'] != self.defaults['ignoreFilePatterns']: parms['ignoreFilePatterns'] = self.parameters['ignoreFilePatterns'][:] for pattern in self.parameters['ignoreFilePatterns']: - args.append("--exclude-file=%s" % pattern) + args.append("--exclude-file={0}".format(pattern)) if self.parameters['useRecursion'] != self.defaults['useRecursion']: parms['useRecursion'] = self.parameters['useRecursion'] args.append('-r') @@ -150,7 +150,7 @@ args.append('-p') parms['languages'] = self.parameters['languages'][:] for lang in self.parameters['languages']: - args.append('--language=%s' % lang) + args.append('--language={0}'.format(lang)) return (args, parms)