diff --git a/qgispluginci/release.py b/qgispluginci/release.py index bedcc99b..5214007c 100644 --- a/qgispluginci/release.py +++ b/qgispluginci/release.py @@ -390,7 +390,7 @@ def upload_plugin_to_osgeo(username: str, password: str, archive: str): def check_release_keywords(release_version: str) -> str: - """ Check if we are releasing some special version shortcut. """ + """Check if we are releasing some special version shortcut.""" if release_version not in ("latest", "next"): return release_version diff --git a/qgispluginci/utils.py b/qgispluginci/utils.py index 312eee94..98ffa965 100644 --- a/qgispluginci/utils.py +++ b/qgispluginci/utils.py @@ -14,7 +14,7 @@ def replace_in_file(file_path: str, pattern, new: str, encoding: str = "utf8"): def append_to_file(file_path: str, new_line: str): - """ Append a line in a file. """ + """Append a line in a file.""" with open(file_path, "a", encoding="utf8") as f: f.write("{}\n".format(new_line)) diff --git a/qgispluginci/version_note.py b/qgispluginci/version_note.py index 284fcb1f..23f72923 100644 --- a/qgispluginci/version_note.py +++ b/qgispluginci/version_note.py @@ -31,7 +31,7 @@ def version(self) -> str: return f"{self.major}.{self.minor}.{self.patch}" def increment_pre_release(self) -> str: - """ Increment the pre-release string. """ + """Increment the pre-release string.""" items = self.prerelease.split(".") numbers = "".join([i for i in self.prerelease if i.isdigit()]) @@ -45,7 +45,7 @@ def increment_pre_release(self) -> str: return f"{items[0]}.{int(numbers) + 1}" def next_version(self) -> NamedTuple: - """ Increment the pre-release string or the patch. """ + """Increment the pre-release string or the patch.""" # "pre" is not supported by QGIS # https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/version_compare.py if not self.prerelease: diff --git a/test/test_release.py b/test/test_release.py index e9d14a84..d1bb792d 100644 --- a/test/test_release.py +++ b/test/test_release.py @@ -180,7 +180,7 @@ def test_release_changelog(self): ) def test_release_latest_next(self): - """ Test releasing the latest and next versions. """ + """Test releasing the latest and next versions.""" keywords = ("next", "latest") for keyword in keywords: with self.subTest(i=keyword): diff --git a/test/test_utils.py b/test/test_utils.py index e7888a05..7b9fb6a9 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -50,7 +50,7 @@ def test_version_note_from_tag(self): self.assertFalse(version.is_prerelease) def test_next_version(self): - """ Test to guess the next version. """ + """Test to guess the next version.""" self.assertEqual(parse_tag("10.1.0").next_version().version, "10.1.1-alpha") self.assertEqual( parse_tag("10.1.0-beta").next_version().version, "10.1.0-beta.1"