File: util.py

package info (click to toggle)
python-openapi-core 0.19.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,008 kB
  • sloc: python: 18,868; makefile: 47
file content (15 lines) | stat: -rw-r--r-- 352 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from typing import Any
from typing import Dict
from typing import Generator
from typing import Tuple


def unpack_params(
    params: Dict[str, Any]
) -> Generator[Tuple[str, Any], None, None]:
    for k, v in params.items():
        if isinstance(v, list):
            for v2 in v:
                yield (k, v2)
        else:
            yield (k, v)