Elron commited on
Commit
f61017e
1 Parent(s): 4999818

Upload type_utils.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. type_utils.py +2 -0
type_utils.py CHANGED
@@ -41,6 +41,8 @@ def isoftype(object, type):
41
  elif origin is tuple:
42
  return all(isoftype(element, type_arg) for element, type_arg in zip(object, type_args))
43
  else:
 
 
44
  return isinstance(object, type)
45
 
46
 
 
41
  elif origin is tuple:
42
  return all(isoftype(element, type_arg) for element, type_arg in zip(object, type_args))
43
  else:
44
+ if type == typing.Any:
45
+ return True
46
  return isinstance(object, type)
47
 
48