We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a97f905 commit 24a8f08Copy full SHA for 24a8f08
src/trio/_sync.py
@@ -112,13 +112,11 @@ def statistics(self) -> EventStatistics:
112
"""
113
return EventStatistics(tasks_waiting=len(self._tasks))
114
115
- if not TYPE_CHECKING:
116
-
117
- def __bool__(self) -> NoReturn:
118
- """Raise NotImplementedError."""
119
- raise NotImplementedError(
120
- "Trio events cannot be treated as bools; consider using 'event.is_set()'"
121
- )
+ def __bool__(self) -> NoReturn:
+ """Raise NotImplementedError."""
+ raise NotImplementedError(
+ "Trio events cannot be treated as bools; consider using 'event.is_set()'"
+ )
122
123
124
class _HasAcquireRelease(Protocol):
0 commit comments