Raise SpecValidationError if any port is used more than once
(ports: List[int])
| 186 | |
| 187 | |
| 188 | def validate_unique_ports(ports: List[int]) -> None: |
| 189 | """Raise SpecValidationError if any port is used more than once""" |
| 190 | if len(ports) != len(set(ports)): |
| 191 | raise SpecValidationError( |
| 192 | 'Invalid port: Duplicate ports are not allowed' |
| 193 | ) |
no test coverage detected