Replace dotted paths on the provided allow-list with tuples.
(
allow_list: set[tuple[str, ...] | str],
)
| 224 | |
| 225 | |
| 226 | def _coerce_path_to_tuples( |
| 227 | allow_list: set[tuple[str, ...] | str], |
| 228 | ) -> set[tuple[str, ...]]: |
| 229 | """Replace dotted paths on the provided allow-list with tuples.""" |
| 230 | return { |
| 231 | path if isinstance(path, tuple) else tuple(path.split(".")) |
| 232 | for path in allow_list |
| 233 | } |
| 234 | |
| 235 | |
| 236 | @undoc |
no outgoing calls
no test coverage detected
searching dependent graphs…