python-trio / trio-typing

Type hints for Trio and related projects
Other
27 stars 13 forks source link

Type mismatch between open_signal_receiver and Process.send_signal #78

Closed Redoubts closed 8 months ago

Redoubts commented 1 year ago

I'm playing with 0.8.0, and I noticed that trio.open_signal_receiver gives me an AsyncIterator[int], but trio.Process.send_signal takes Signals. Ideally I'd be able to pass one into the other without a cast or type-ignore.

A5rocks commented 8 months ago

I believe this is fixed in trio's new inline type hints? trio.Process.send_signal takes int | Signals so you should be able to pass in ints.