diff --git a/python/pyplugin_installer/installer_data.py b/python/pyplugin_installer/installer_data.py index ee64a06c7f8..1036320146f 100644 --- a/python/pyplugin_installer/installer_data.py +++ b/python/pyplugin_installer/installer_data.py @@ -214,7 +214,7 @@ class Repositories(QObject): def urlParams(self): """ return GET parameters to be added to every request """ # Strip down the point release segment from the version string - return "?qgis=%s" % re.sub('\.\d*$', '', pyQgisVersion()) + return "?qgis={}".format(re.sub(r'\.\d*$', '', pyQgisVersion())) # ----------------------------------------- # def setRepositoryData(self, reposName, key, value): diff --git a/python/pyplugin_installer/version_compare.py b/python/pyplugin_installer/version_compare.py index 70c2045f7bc..e85fdc921b2 100644 --- a/python/pyplugin_installer/version_compare.py +++ b/python/pyplugin_installer/version_compare.py @@ -207,7 +207,7 @@ def pyQgisVersion(): If Y = 99, bump up to (X+1.0.0), so e.g. 2.99 becomes 3.0.0 This way QGIS X.99 is only compatible with plugins for the upcoming major release. """ - x, y, z = re.findall('^(\d*).(\d*).(\d*)', Qgis.QGIS_VERSION)[0] + x, y, z = re.findall(r'^(\d*).(\d*).(\d*)', Qgis.QGIS_VERSION)[0] if y == '99': x = str(int(x) + 1) y = z = '0'