☰
Debian Codegraph
@
3.2.12-1
3.2.11-1
/
/
src
/
graphql
/
pyutils
/
print_path_list.py
☽
☼
src/graphql/pyutils/print_path_list.py
code
plain
raw
MIT
Christoph Zwerschke <
[email protected]
>; Syrus Akbary <
[email protected]
>; Jake Heinz; GraphQL Contributors
debian/copyright
1
from typing import Collection, Union
2
3
4
def print_path_list(path: Collection[Union[str, int]]) -> str:
5
"""Build a string describing the path."""
6
return "".join(f"[{key}]" if isinstance(key, int) else f".{key}" for key in path)