python-trio / trio-typing

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

There should be a functools.partial plugin #11

Open oremanj opened 5 years ago

oremanj commented 5 years ago

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.

A5rocks commented 10 months ago

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.

jakkdl commented 10 months ago

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.