| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 90134c9 commit 0b17a2d
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -402,32 +402,6 @@ def version(self) -> Tuple[str, str]: | |||
| 402 | 402 | ||
| 403 | 403 | return cast(str, self._server_version), cast(str, self._server_revision) | |
| 404 | 404 | ||
| 405 | - @gitlab.exceptions.on_http_error(gitlab.exceptions.GitlabVerifyError) | ||
| 406 | - def lint(self, content: str, **kwargs: Any) -> Tuple[bool, List[str]]: | ||
| 407 | - """Validate a gitlab CI configuration. | ||
| 408 | - | ||
| 409 | - Args: | ||
| 410 | - content: The .gitlab-ci.yml content | ||
| 411 | - **kwargs: Extra options to send to the server (e.g. sudo) | ||
| 412 | - | ||
| 413 | - Raises: | ||
| 414 | - GitlabAuthenticationError: If authentication is not correct | ||
| 415 | - GitlabVerifyError: If the validation could not be done | ||
| 416 | - | ||
| 417 | - Returns: | ||
| 418 | - (True, []) if the file is valid, (False, errors(list)) otherwise | ||
| 419 | - """ | ||
| 420 | - utils.warn( | ||
| 421 | - "`lint()` is deprecated and will be removed in a future version.\n" | ||
| 422 | - "Please use `ci_lint.create()` instead.", | ||
| 423 | - category=DeprecationWarning, | ||
| 424 | - ) | ||
| 425 | - post_data = {"content": content} | ||
| 426 | - data = self.http_post("/ci/lint", post_data=post_data, **kwargs) | ||
| 427 | - if TYPE_CHECKING: | ||
| 428 | - assert not isinstance(data, requests.Response) | ||
| 429 | - return (data["status"] == "valid", data["errors"]) | ||
| 430 | - | ||
| 431 | 405 | @gitlab.exceptions.on_http_error(gitlab.exceptions.GitlabMarkdownError) | |
| 432 | 406 | def markdown( | |
| 433 | 407 | self, text: str, gfm: bool = False, project: Optional[str] = None, **kwargs: Any | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -66,13 +66,6 @@ def test_markdown_in_project(gl, project): | |||
| 66 | 66 | assert "foo" in html | |
| 67 | 67 | ||
| 68 | 68 | ||
| 69 | - def test_lint(gl): | ||
| 70 | - with pytest.deprecated_call(): | ||
| 71 | - success, errors = gl.lint("Invalid") | ||
| 72 | - assert success is False | ||
| 73 | - assert errors | ||
| 74 | - | ||
| 75 | - | ||
| 76 | 69 | def test_sidekiq_queue_metrics(gl): | |
| 77 | 70 | out = gl.sidekiq.queue_metrics() | |
| 78 | 71 | assert isinstance(out, dict) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments