SimpleData = Any
-ObjectResponseFuncType = Union[
- Callable[..., Dict[Any, Any]],
- Callable[..., List[Any]],
-]
-
-
class SimpleDataProvider(Protocol):
def to_simplified(self) -> SimpleData:
"""Return a simplified representation of the current object.
return err
+ObjectResponseFuncType = Union[
+ Callable[..., Dict[Any, Any]],
+ Callable[..., List[Any]],
+ Callable[..., SimpleDataProvider],
+ Callable[..., JSONDataProvider],
+ Callable[..., YAMLDataProvider],
+ Callable[..., ReturnValueProvider],
+]
+
+
def _get_requested_format(f: ObjectResponseFuncType, kw: Dict[str, Any]) -> str:
# todo: leave 'format' in kw dict iff its part of f's signature
return kw.pop("format", None)