Spaces:
Build error
Build error
File size: 303 Bytes
d61b9c7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#!/usr/bin/env python3
from typing import Callable, List, Optional, Union
def format_transforms(
transforms: Optional[Union[Callable, List[Callable]]]
) -> List[Callable]:
if transforms is None:
return []
if callable(transforms):
return [transforms]
return transforms
|