| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -301,7 +301,7 @@ def main() -> None: | |||
| 301 | 301 | sys.exit(e) | |
| 302 | 302 | # We only support v4 API at this time | |
| 303 | 303 | if config.api_version not in ("4",): # dead code # pragma: no cover | |
| 304 | - raise ModuleNotFoundError(name=f"gitlab.v{config.api_version}.cli") | ||
| 304 | + raise ModuleNotFoundError(f"gitlab.v{config.api_version}.cli") | ||
| 305 | 305 | ||
| 306 | 306 | # Now we build the entire set of subcommands and do the complete parsing | |
| 307 | 307 | parser = _get_parser() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -116,7 +116,7 @@ def __init__( | |||
| 116 | 116 | ||
| 117 | 117 | # We only support v4 API at this time | |
| 118 | 118 | if self._api_version not in ("4",): | |
| 119 | - raise ModuleNotFoundError(name=f"gitlab.v{self._api_version}.objects") | ||
| 119 | + raise ModuleNotFoundError(f"gitlab.v{self._api_version}.objects") | ||
| 120 | 120 | # NOTE: We must delay import of gitlab.v4.objects until now or | |
| 121 | 121 | # otherwise it will cause circular import errors | |
| 122 | 122 | import gitlab.v4.objects | |
@@ -209,7 +209,7 @@ def __setstate__(self, state: Dict[str, Any]) -> None: | |||
| 209 | 209 | # We only support v4 API at this time | |
| 210 | 210 | if self._api_version not in ("4",): | |
| 211 | 211 | raise ModuleNotFoundError( | |
| 212 | - name=f"gitlab.v{self._api_version}.objects" | ||
| 212 | + f"gitlab.v{self._api_version}.objects" | ||
| 213 | 213 | ) # pragma: no cover, dead code currently | |
| 214 | 214 | # NOTE: We must delay import of gitlab.v4.objects until now or | |
| 215 | 215 | # otherwise it will cause circular import errors | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,7 +91,7 @@ def test_gitlab_init_with_valid_api_version(): | |||
| 91 | 91 | ||
| 92 | 92 | ||
| 93 | 93 | def test_gitlab_init_with_invalid_api_version(): | |
| 94 | - with pytest.raises(ModuleNotFoundError): | ||
| 94 | + with pytest.raises(ModuleNotFoundError, match="gitlab.v1.objects"): | ||
| 95 | 95 | gitlab.Gitlab(api_version="1") | |
| 96 | 96 | ||
| 97 | 97 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments