Check type narrowing specifically for the container exceptiongroup.
()
| 125 | |
| 126 | |
| 127 | def raisesgroup_narrow_baseexceptiongroup() -> None: |
| 128 | """Check type narrowing specifically for the container exceptiongroup.""" |
| 129 | |
| 130 | def handle_group(e: ExceptionGroup[Exception]) -> bool: |
| 131 | return True |
| 132 | |
| 133 | def handle_group_value(e: ExceptionGroup[ValueError]) -> bool: |
| 134 | return True |
| 135 | |
| 136 | RaisesGroup(ValueError, check=handle_group_value) |
| 137 | |
| 138 | RaisesGroup(Exception, check=handle_group) |
| 139 | |
| 140 | |
| 141 | def check_raisesexc_transparent() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…