<@U06A03HV1> `await Get[X](...)` is now type-check...
# development
a
@witty-crayon-22786
await Get[X](...)
is now type-checked to return
X
in https://github.com/pantsbuild/pants/pull/8639, allowing the use of
x = await Get[X](Y, y)
or
x = await Get[X](Y(...))
, where the result of the
await
is statically known to have the
X
type. This allows mypy to check that uses of
x
are type-safe without a separate annotation.
w
So, imo, let's stash that commit and leave the redundancy for now? There are a bunch of possible syntaxes there, but the rest of the change is a clear win
a
ok, that sounds great!
i will do that now
w
thank you.
a
reverted the
await Get[X](...)
syntax for now, super easy to do in a followup. i kept the docstrings/etc from that part. thanks for low-latency feedback!!
👍 1
thanks a ton for your input this weekend
👍 1