Skip to content

Commit 24a8f08

Browse files
committed
Don't do if type checking block, jedi doesn't like that
1 parent a97f905 commit 24a8f08

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/trio/_sync.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,11 @@ def statistics(self) -> EventStatistics:
112112
"""
113113
return EventStatistics(tasks_waiting=len(self._tasks))
114114

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-
)
115+
def __bool__(self) -> NoReturn:
116+
"""Raise NotImplementedError."""
117+
raise NotImplementedError(
118+
"Trio events cannot be treated as bools; consider using 'event.is_set()'"
119+
)
122120

123121

124122
class _HasAcquireRelease(Protocol):

0 commit comments

Comments
 (0)