Drop generic directions when a more specific sibling exists.
(direction_weights: Dict[str, float])
| 74 | |
| 75 | |
| 76 | def _prune_redundant_directions(direction_weights: Dict[str, float]) -> Dict[str, float]: |
| 77 | """Drop generic directions when a more specific sibling exists.""" |
| 78 | pruned = dict(direction_weights) |
| 79 | |
| 80 | for primary, redundant_keys in REDUNDANT_DIRECTION_MAP.items(): |
| 81 | if primary not in pruned: |
| 82 | continue |
| 83 | for redundant_key in redundant_keys: |
| 84 | pruned.pop(redundant_key, None) |
| 85 | |
| 86 | return pruned |
| 87 | |
| 88 | |
| 89 | def _select_seed_directions(role_name: str, parsed: Dict[str, Any]) -> Dict[str, float]: |
no outgoing calls
no test coverage detected