[codegen/python] Fix resource outputs type annotations (#5221)

These should be typed as `Output[T]`.
This commit is contained in:
Justin Van Patten 2020-08-25 18:07:22 +00:00 committed by GitHub
parent 4c42e5e850
commit 502685ed0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -902,7 +902,7 @@ func (mod *modContext) genResource(res *schema.Resource) (string, error) {
} else {
fmt.Fprintf(w, " @pulumi.getter(name=%q)\n", prop.Name)
}
fmt.Fprintf(w, " def %s(self) -> %s:\n", pname, ty)
fmt.Fprintf(w, " def %s(self) -> pulumi.Output[%s]:\n", pname, ty)
if prop.Comment != "" {
printComment(w, prop.Comment, " ")
}