Debian Codegraph @

src/graphql/pyutils/print_path_list.py

raw
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)