@@ -87,15 +87,15 @@ def _get_or_create(
8787 return None
8888
8989 # we are sure that this is dict because of check above
90- model_data = t .cast (t .Dict [str , t .Any ], model_data )
90+ model_data = t .cast (' t.Dict[str, t.Any]' , model_data )
9191
9292 # resolve a record model by type and try to deserialize
9393 record_type : t .Any = model_data .get (_TYPE_SERVICE_FIELD )
9494 if record_type not in RECORD_TYPE_TO_MODEL_CLASS :
9595 return None
9696
9797 # now we are sure that this is str because it's in RECORD_TYPE_TO_MODEL_CLASS
98- record_type = t .cast (str , record_type )
98+ record_type = t .cast (' str' , record_type )
9999
100100 return get_or_create (
101101 model_data ,
@@ -120,15 +120,15 @@ def _get_or_create(
120120def get_response_model (response : 'Response' , model : t .Type [M ]) -> M :
121121 if model is bool :
122122 # Could not be False? Because the exception with errors will be raised from the server
123- return t .cast (M , response .success )
123+ return t .cast ('M' , response .success )
124124 if model is bytes :
125- return t .cast (M , response .content )
125+ return t .cast ('M' , response .content )
126126
127127 if not isinstance (response .content , dict ):
128128 raise ModelError ("Can't properly parse response model because JSON is expected in response" )
129129
130130 # casting to M because of enabled strict mode
131- return t .cast (M , get_or_create (response .content , model , strict = True ))
131+ return t .cast ('M' , get_or_create (response .content , model , strict = True ))
132132
133133
134134def get_model_as_dict (model : t .Union [DotDict , BlobRef , ModelBase ]) -> t .Dict [str , t .Any ]:
0 commit comments