(ref: ReferenceType[_T])
| 146 | return None |
| 147 | |
| 148 | def remove(ref: ReferenceType[_T]) -> None: |
| 149 | key = event.registry._EventKey( # type: ignore [type-var] |
| 150 | None, |
| 151 | identifier, |
| 152 | listen, |
| 153 | instrumentation._instrumentation_factory, |
| 154 | ) |
| 155 | getattr( |
| 156 | instrumentation._instrumentation_factory.dispatch, identifier |
| 157 | ).remove(key) |
| 158 | |
| 159 | target = weakref.ref(target.class_, remove) |
| 160 |