(priority: str)
| 47 | |
| 48 | |
| 49 | def _validate_priority(priority: str) -> str: |
| 50 | allowed = {'high', 'medium', 'low'} |
| 51 | if priority not in allowed: |
| 52 | raise ValueError( |
| 53 | f'Invalid todo priority "{priority}", must be one of {sorted(allowed)}.' |
| 54 | ) |
| 55 | return priority |
| 56 | |
| 57 | |
| 58 | @dataclass |
no outgoing calls
no test coverage detected