diff --git a/src/finch/_qs.py b/src/finch/_qs.py index e7aa3e13..274320ca 100644 --- a/src/finch/_qs.py +++ b/src/finch/_qs.py @@ -34,7 +34,7 @@ def __init__( self.nested_format = nested_format def parse(self, query: str) -> Mapping[str, object]: - # TODO + # Note: custom format syntax is not supported yet return parse_qs(query) def stringify( @@ -89,9 +89,11 @@ def _stringify_item( if isinstance(value, (list, tuple)): array_format = opts.array_format if array_format == "comma": - # TODO: support list of objects? return [ - (key, ",".join(self._primitive_value_to_str(item) for item in value if item is not None)), + ( + key, + ",".join(self._primitive_value_to_str(item) for item in value if item is not None), + ), ] elif array_format == "repeat": items = [] diff --git a/tests/utils.py b/tests/utils.py index 986f79fa..72c546d7 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -25,6 +25,10 @@ def assert_matches_model(model: type[BaseModelT], value: BaseModelT, *, path: li # Note: the `path` argument is only used to improve error messages when `--showlocals` is used def assert_matches_type(type_: Any, value: object, *, path: list[str]) -> None: + if type_ is None: + assert value is None + return + origin = get_origin(type_) or type_ if is_list_type(type_):