| Conditions | 2 |
| Total Lines | 9 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from pathlib import Path |
||
| 20 | @classmethod |
||
| 21 | def default_path_of(cls, what: Search, input_path: Path) -> Path: |
||
| 22 | parent = input_path.parent / (input_path.stem + "-output") |
||
| 23 | parent.mkdir(exist_ok=True) |
||
| 24 | child = what.key + ".csv" |
||
| 25 | node = PathTools.sanitize_path_node(child) |
||
| 26 | if (parent / node).resolve() != (parent / child).resolve(): |
||
| 27 | logger.debug(f"Path {child} sanitized to {node}") |
||
| 28 | return parent / node |
||
| 29 | |||
| 32 |