@@ -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
0 commit comments