https://pantsbuild.org/ logo
#development
Title
# development
a

aloof-angle-91616

11/18/2019, 6:31 AM
@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

witty-crayon-22786

11/18/2019, 3:33 PM
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

aloof-angle-91616

11/18/2019, 4:44 PM
ok, that sounds great!
i will do that now
w

witty-crayon-22786

11/18/2019, 5:07 PM
thank you.
a

aloof-angle-91616

11/18/2019, 5:07 PM
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