Add support for string response deserialization (#12910)

* Add support for string response deserialization

* updated samples

* updated samples

* realigned to master

* fix: errors were not getting thrown

* updated samples

* fix: errors were not getting thrown

* updated samples
This commit is contained in:
Emanuele Saccomandi
2022-07-21 06:45:50 +02:00
committed by GitHub
parent cf58ac0583
commit b8524bee23
123 changed files with 76 additions and 10025 deletions

View File

@@ -1,32 +0,0 @@
# coding: utf-8
import sys
if sys.version_info < (3, 7):
import typing
def is_generic(klass):
""" Determine whether klass is a generic class """
return type(klass) == typing.GenericMeta
def is_dict(klass):
""" Determine whether klass is a Dict """
return klass.__extra__ == dict
def is_list(klass):
""" Determine whether klass is a List """
return klass.__extra__ == list
else:
def is_generic(klass):
""" Determine whether klass is a generic class """
return hasattr(klass, '__origin__')
def is_dict(klass):
""" Determine whether klass is a Dict """
return klass.__origin__ == dict
def is_list(klass):
""" Determine whether klass is a List """
return klass.__origin__ == list