Allow/pass functions when loading group data.
from os import listdir, path
-from types import GeneratorType
+from types import FunctionType, GeneratorType
try:
from types import SimpleNamespace
@@ -21,7 +21,7 @@ ALLOWED_HOST_TYPES = tuple(
ALLOWED_DATA_TYPES = tuple(
six.integer_types
+ (six.text_type, six.binary_type)
- + (bool, dict, list, set, tuple, float, complex, SimpleNamespace),
+ + (bool, dict, list, set, tuple, float, complex, SimpleNamespace, FunctionType),
)
