@@ -145,7 +145,7 @@ def __init__(
145145def __enter__ (self )-> "Gitlab" :
146146return self
147147
148- def __exit__ (self ,* args )-> None :
148+ def __exit__ (self ,* args : Any )-> None :
149149self .session .close ()
150150
151151def __getstate__ (self )-> Dict [str ,Any ]:
@@ -180,7 +180,9 @@ def api_version(self) -> str:
180180return self ._api_version
181181
182182@classmethod
183- def from_config (cls ,gitlab_id = None ,config_files = None )-> "Gitlab" :
183+ def from_config (
184+ cls ,gitlab_id :Optional [str ]= None ,config_files :Optional [List [str ]]= None
185+ )-> "Gitlab" :
184186"""Create a Gitlab connection from configuration files.
185187
186188 Args:
@@ -247,7 +249,7 @@ def version(self) -> Tuple[str, str]:
247249return cast (str ,self ._server_version ),cast (str ,self ._server_revision )
248250
249251@gitlab .exceptions .on_http_error (gitlab .exceptions .GitlabVerifyError )
250- def lint (self ,content :str ,** kwargs )-> Tuple [bool ,List [str ]]:
252+ def lint (self ,content :str ,** kwargs : Any )-> Tuple [bool ,List [str ]]:
251253"""Validate a gitlab CI configuration.
252254
253255 Args:
@@ -269,7 +271,7 @@ def lint(self, content: str, **kwargs) -> Tuple[bool, List[str]]:
269271
270272@gitlab .exceptions .on_http_error (gitlab .exceptions .GitlabMarkdownError )
271273def markdown (
272- self ,text :str ,gfm :bool = False ,project :Optional [str ]= None ,** kwargs
274+ self ,text :str ,gfm :bool = False ,project :Optional [str ]= None ,** kwargs : Any
273275 )-> str :
274276"""Render an arbitrary Markdown document.
275277
@@ -296,7 +298,7 @@ def markdown(
296298return data ["html" ]
297299
298300@gitlab .exceptions .on_http_error (gitlab .exceptions .GitlabLicenseError )
299- def get_license (self ,** kwargs )-> Dict [str ,Any ]:
301+ def get_license (self ,** kwargs : Any )-> Dict [str ,Any ]:
300302"""Retrieve information about the current license.
301303
302304 Args:
@@ -315,7 +317,7 @@ def get_license(self, **kwargs) -> Dict[str, Any]:
315317return {}
316318
317319@gitlab .exceptions .on_http_error (gitlab .exceptions .GitlabLicenseError )
318- def set_license (self ,license :str ,** kwargs )-> Dict [str ,Any ]:
320+ def set_license (self ,license :str ,** kwargs : Any )-> Dict [str ,Any ]:
319321"""Add a new license.
320322
321323 Args:
@@ -446,7 +448,7 @@ def http_request(
446448post_data :Optional [Dict [str ,Any ]]= None ,
447449streamed :bool = False ,
448450files :Optional [Dict [str ,Any ]]= None ,
449- ** kwargs ,
451+ ** kwargs : Any ,
450452 )-> requests .Response :
451453"""Make an HTTP request to the Gitlab server.
452454
@@ -577,7 +579,7 @@ def http_get(
577579query_data :Optional [Dict [str ,Any ]]= None ,
578580streamed :bool = False ,
579581raw :bool = False ,
580- ** kwargs ,
582+ ** kwargs : Any ,
581583 )-> Union [Dict [str ,Any ],requests .Response ]:
582584"""Make a GET request to the Gitlab server.
583585
@@ -621,8 +623,8 @@ def http_list(
621623self ,
622624path :str ,
623625query_data :Optional [Dict [str ,Any ]]= None ,
624- as_list = None ,
625- ** kwargs ,
626+ as_list : Optional [ bool ] = None ,
627+ ** kwargs : Any ,
626628 )-> Union ["GitlabList" ,List [Dict [str ,Any ]]]:
627629"""Make a GET request to the Gitlab server for list-oriented queries.
628630
@@ -670,7 +672,7 @@ def http_post(
670672query_data :Optional [Dict [str ,Any ]]= None ,
671673post_data :Optional [Dict [str ,Any ]]= None ,
672674files :Optional [Dict [str ,Any ]]= None ,
673- ** kwargs ,
675+ ** kwargs : Any ,
674676 )-> Union [Dict [str ,Any ],requests .Response ]:
675677"""Make a POST request to the Gitlab server.
676678
@@ -717,7 +719,7 @@ def http_put(
717719query_data :Optional [Dict [str ,Any ]]= None ,
718720post_data :Optional [Dict [str ,Any ]]= None ,
719721files :Optional [Dict [str ,Any ]]= None ,
720- ** kwargs ,
722+ ** kwargs : Any ,
721723 )-> Union [Dict [str ,Any ],requests .Response ]:
722724"""Make a PUT request to the Gitlab server.
723725
@@ -755,7 +757,7 @@ def http_put(
755757error_message = "Failed to parse the server message"
756758 )from e
757759
758- def http_delete (self ,path :str ,** kwargs )-> requests .Response :
760+ def http_delete (self ,path :str ,** kwargs : Any )-> requests .Response :
759761"""Make a PUT request to the Gitlab server.
760762
761763 Args:
@@ -773,7 +775,7 @@ def http_delete(self, path: str, **kwargs) -> requests.Response:
773775
774776@gitlab .exceptions .on_http_error (gitlab .exceptions .GitlabSearchError )
775777def search (
776- self ,scope :str ,search :str ,** kwargs
778+ self ,scope :str ,search :str ,** kwargs : Any
777779 )-> Union ["GitlabList" ,List [Dict [str ,Any ]]]:
778780"""Search GitLab resources matching the provided string.'
779781
@@ -806,7 +808,7 @@ def __init__(
806808url :str ,
807809query_data :Dict [str ,Any ],
808810get_next :bool = True ,
809- ** kwargs ,
811+ ** kwargs : Any ,
810812 )-> None :
811813self ._gl = gl
812814
@@ -817,7 +819,7 @@ def __init__(
817819self ._get_next = get_next
818820
819821def _query (
820- self ,url :str ,query_data :Optional [Dict [str ,Any ]]= None ,** kwargs
822+ self ,url :str ,query_data :Optional [Dict [str ,Any ]]= None ,** kwargs : Any
821823 )-> None :
822824query_data = query_data or {}
823825result = self ._gl .http_request ("get" ,url ,query_data = query_data ,** kwargs )
@@ -842,7 +844,7 @@ def _query(
842844self ._total :Optional [Union [str ,int ]]= result .headers .get ("X-Total" )
843845
844846try :
845- self ._data = result .json ()
847+ self ._data : List [ Dict [ str , Any ]] = result .json ()
846848except Exception as e :
847849raise gitlab .exceptions .GitlabParsingError (
848850error_message = "Failed to parse the server message"