Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b17a2d

Browse files
nejchJohnVillalovos
authored andcommitted
refactor(lint): remove deprecatedlint()in favor ofci_lint.create()
BREAKING CHANGE: The deprecated `lint()` method is no longer available.Use `ci_lint.create()` instead.
1 parent90134c9 commit0b17a2d

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

‎gitlab/client.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -402,32 +402,6 @@ def version(self) -> Tuple[str, str]:
402402

403403
returncast(str,self._server_version),cast(str,self._server_revision)
404404

405-
@gitlab.exceptions.on_http_error(gitlab.exceptions.GitlabVerifyError)
406-
deflint(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-
ifTYPE_CHECKING:
428-
assertnotisinstance(data,requests.Response)
429-
return (data["status"]=="valid",data["errors"])
430-
431405
@gitlab.exceptions.on_http_error(gitlab.exceptions.GitlabMarkdownError)
432406
defmarkdown(
433407
self,text:str,gfm:bool=False,project:Optional[str]=None,**kwargs:Any

‎tests/functional/api/test_gitlab.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,6 @@ def test_markdown_in_project(gl, project):
6666
assert"foo"inhtml
6767

6868

69-
deftest_lint(gl):
70-
withpytest.deprecated_call():
71-
success,errors=gl.lint("Invalid")
72-
assertsuccessisFalse
73-
asserterrors
74-
75-
7669
deftest_sidekiq_queue_metrics(gl):
7770
out=gl.sidekiq.queue_metrics()
7871
assertisinstance(out,dict)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp