MCPcopy Index your code
hub / github.com/pytest-dev/pytest / raisesgroup_narrow_baseexceptiongroup

Function raisesgroup_narrow_baseexceptiongroup

testing/typing_raises_group.py:127–138  ·  view source on GitHub ↗

Check type narrowing specifically for the container exceptiongroup.

()

Source from the content-addressed store, hash-verified

125
126
127def 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
141def check_raisesexc_transparent() -> None:

Callers

nothing calls this directly

Calls 1

RaisesGroupClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…