diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-11-01 19:22:18 +0100 |
---|---|---|
committer | Nejc Habjan <hab.nejc@gmail.com> | 2021-11-02 07:03:33 +0100 |
commit | 30fa865cfe145d172b7061cb2af03837b3d1d312 (patch) | |
tree | 414f0a060d4dce56310327e07cbdcf7f41f39fc3 /gitlab/config.py | |
parent | c7fdad42f68927d79e0d1963ade3324370b9d0e2 (diff) | |
download | gitlab-refactor/f-strings.tar.gz |
refactor: use f-strings for string formattingrefactor/f-strings
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: |