@@ -439,6 +439,7 @@ def markdown(
439439data = self .http_post ("/markdown" ,post_data = post_data ,** kwargs )
440440if TYPE_CHECKING :
441441assert not isinstance (data ,requests .Response )
442+ assert isinstance (data ["html" ],str )
442443return data ["html" ]
443444
444445@gitlab .exceptions .on_http_error (gitlab .exceptions .GitlabLicenseError )
@@ -808,7 +809,10 @@ def http_get(
808809and not raw
809810 ):
810811try :
811- return result .json ()
812+ json_result = result .json ()
813+ if TYPE_CHECKING :
814+ assert isinstance (json_result ,dict )
815+ return json_result
812816except Exception as e :
813817raise gitlab .exceptions .GitlabParsingError (
814818error_message = "Failed to parse the server message"
@@ -989,7 +993,10 @@ def http_post(
989993 )
990994try :
991995if result .headers .get ("Content-Type" ,None )== "application/json" :
992- return result .json ()
996+ json_result = result .json ()
997+ if TYPE_CHECKING :
998+ assert isinstance (json_result ,dict )
999+ return json_result
9931000except Exception as e :
9941001raise gitlab .exceptions .GitlabParsingError (
9951002error_message = "Failed to parse the server message"
@@ -1037,7 +1044,10 @@ def http_put(
10371044** kwargs ,
10381045 )
10391046try :
1040- return result .json ()
1047+ json_result = result .json ()
1048+ if TYPE_CHECKING :
1049+ assert isinstance (json_result ,dict )
1050+ return json_result
10411051except Exception as e :
10421052raise gitlab .exceptions .GitlabParsingError (
10431053error_message = "Failed to parse the server message"