Method: rich.prompt.Confirm.process_response
Calls: 9, Exceptions: 6, Paths: 2Back
Path 1: 6 calls (0.67)
'foo\n' (3) 'NO\n' (3)
InvalidResponse (6)
1def process_response(self, value: str) -> bool:
2 """Convert choices to a bool."""
3 value = value.strip().lower()
4 if value not in self.choices:
5 raise InvalidResponse(self.validate_error_message)
6 return value == self.choices[0]
Path 2: 3 calls (0.33)
'y' (2) 'n' (1)
True (2) False (1)
1def process_response(self, value: str) -> bool:
2 """Convert choices to a bool."""
3 value = value.strip().lower()
4 if value not in self.choices:
5 raise InvalidResponse(self.validate_error_message)
6 return value == self.choices[0]