trio-typing
trio-typing copied to clipboard
There should be a functools.partial plugin
Utility isn't restricted to just Trio, but Trio programs tend to make fairly heavy use of functools.partial. I started work on this a while ago (see the 'partial' branch) but ran into a blocker bug in mypy. That bug has since been fixed, so the time might be ripe for someone to make another attempt.
Looks like people have implemented their own partial elsewhere: https://github.com/python/mypy/issues/1484#issuecomment-625423210
But I dunno; might be worth keeping this issue open.
we could possibly document it as a suggestion. At this point it feels like we should have a Typing section in the trio docs, there's probably going to pop up more stuff to put there.