@@ -414,7 +414,7 @@ def xmlDownloaded(self):
414414 trusted = True
415415 icon = pluginNodes .item (i ).firstChildElement ("icon" ).text ().strip ()
416416 if icon and not icon .startswith ("http" ):
417- icon = "http://%s/%s" % (QUrl (self .mRepositories [reposName ]["url" ]).host (), icon )
417+ icon = "http://{}/{}" . format (QUrl (self .mRepositories [reposName ]["url" ]).host (), icon )
418418
419419 if pluginNodes .item (i ).toElement ().hasAttribute ("plugin_id" ):
420420 plugin_id = pluginNodes .item (i ).toElement ().attribute ("plugin_id" )
@@ -473,7 +473,7 @@ def xmlDownloaded(self):
473473 if reply .attribute (QNetworkRequest .HttpStatusCodeAttribute ) == 200 :
474474 self .mRepositories [reposName ]["error" ] = QCoreApplication .translate ("QgsPluginInstaller" , "Server response is 200 OK, but doesn't contain plugin metatada. This is most likely caused by a proxy or a wrong repository URL. You can configure proxy settings in QGIS options." )
475475 else :
476- self .mRepositories [reposName ]["error" ] = QCoreApplication .translate ("QgsPluginInstaller" , "Status code:" ) + " %d %s" % (
476+ self .mRepositories [reposName ]["error" ] = QCoreApplication .translate ("QgsPluginInstaller" , "Status code:" ) + " {} {}" . format (
477477 reply .attribute (QNetworkRequest .HttpStatusCodeAttribute ),
478478 reply .attribute (QNetworkRequest .HttpReasonPhraseAttribute )
479479 )
@@ -583,10 +583,10 @@ def pluginMetadata(fct):
583583 If failed, fallbacks to the standard metadata """
584584 locale = QLocale .system ().name ()
585585 if locale and fct in translatableAttributes :
586- value = metadataParser ("%s[%s]" % (fct , locale ))
586+ value = metadataParser ("{}[{}]" . format (fct , locale ))
587587 if value :
588588 return value
589- value = metadataParser ("%s[%s]" % (fct , locale .split ("_" )[0 ]))
589+ value = metadataParser ("{}[{}]" . format (fct , locale .split ("_" )[0 ]))
590590 if value :
591591 return value
592592 return metadataParser (fct )
@@ -614,7 +614,7 @@ def pluginMetadata(fct):
614614 # if compatible, add the plugin to the list
615615 if not isCompatible (pyQgisVersion (), qgisMinimumVersion , qgisMaximumVersion ):
616616 error = "incompatible"
617- errorDetails = "%s - %s" % (qgisMinimumVersion , qgisMaximumVersion )
617+ errorDetails = "{} - {}" . format (qgisMinimumVersion , qgisMaximumVersion )
618618 elif not os .path .exists (metadataFile ):
619619 error = "broken"
620620 errorDetails = QCoreApplication .translate ("QgsPluginInstaller" , "Missing metadata file" )
0 commit comments