Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 10, 2021
1 parent 4ed481e commit f0c1abd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion qgispluginci/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion qgispluginci/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
4 changes: 2 additions & 2 deletions qgispluginci/version_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()])
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test/test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f0c1abd

Please sign in to comment.