Skip to content

Commit

Permalink
add TODOs for future assert_never type cleverness
Browse files Browse the repository at this point in the history
  • Loading branch information
richardsheridan committed Oct 8, 2023
1 parent d6df308 commit 9f4e79e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trio/_threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def abort(raise_cancel: RaiseCancelT) -> trio.lowlevel.Abort:
await msg_from_thread.run()
elif isinstance(msg_from_thread, RunSync):
msg_from_thread.run_sync()
else: # pragma: no cover, internal debugging guard
else: # pragma: no cover, internal debugging guard TODO: use assert_never
raise TypeError(
"trio.to_thread.run_sync received unrecognized thread message {!r}."
"".format(msg_from_thread)
Expand Down Expand Up @@ -433,7 +433,7 @@ def run_sync() -> None:
outcome.Error(trio.RunFinishedError("system nursery is closed"))
)

else: # pragma: no cover, internal debugging guard
else: # pragma: no cover, internal debugging guard TODO: use assert_never
raise TypeError(
"trio.to_thread.run_sync received unrecognized thread message {!r}."
"".format(message)
Expand Down

0 comments on commit 9f4e79e

Please sign in to comment.