diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-11-01 19:22:18 +0100 |
---|---|---|
committer | John Villalovos <john@sodarock.com> | 2021-11-05 20:45:01 -0700 |
commit | 7925c902d15f20abaecdb07af213f79dad91355b (patch) | |
tree | 4c6766bfac4965590570c1b22ec5a56918461e1c /gitlab/config.py | |
parent | f51d9be224ab509a62efe05e9f8ffb561af62df5 (diff) | |
download | gitlab-7925c902d15f20abaecdb07af213f79dad91355b.tar.gz |
refactor: use f-strings for string formatting
Diffstat (limited to 'gitlab/config.py')
-rw-r--r-- | gitlab/config.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gitlab/config.py b/gitlab/config.py index ba14468..6c75d0a 100644 --- a/gitlab/config.py +++ b/gitlab/config.py @@ -95,8 +95,8 @@ class GitlabConfigParser(object): self.url = self._config.get(self.gitlab_id, "url") except Exception as e: raise GitlabDataError( - "Impossible to get gitlab informations from " - "configuration (%s)" % self.gitlab_id + "Impossible to get gitlab details from " + f"configuration ({self.gitlab_id})" ) from e self.ssl_verify: Union[bool, str] = True @@ -173,7 +173,7 @@ class GitlabConfigParser(object): except Exception: pass if self.api_version not in ("4",): - raise GitlabDataError("Unsupported API version: %s" % self.api_version) + raise GitlabDataError(f"Unsupported API version: {self.api_version}") self.per_page = None for section in ["global", self.gitlab_id]: @@ -182,7 +182,7 @@ class GitlabConfigParser(object): except Exception: pass if self.per_page is not None and not 0 <= self.per_page <= 100: - raise GitlabDataError("Unsupported per_page number: %s" % self.per_page) + raise GitlabDataError(f"Unsupported per_page number: {self.per_page}") self.pagination = None try: |