Skip to content

Commit

Permalink
Merge #11578
Browse files Browse the repository at this point in the history
11578: Don't use *schema.Package in python codegen r=iwahbe a=iwahbe

Part of #9932

tldr: `Package` is not reliable when its used for an external package. We are transferring over to `PackageReference`, and will remove the `Package` field once all references to it have been removed.

Co-authored-by: Ian Wahbe <ian@wahbe.com>
  • Loading branch information
bors[bot] and iwahbe committed Dec 8, 2022
2 parents 833c85a + 65b6b01 commit ef58dcc
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 81 deletions.
4 changes: 2 additions & 2 deletions pkg/codegen/python/doc.go
Expand Up @@ -76,7 +76,7 @@ func (d DocLanguageHelper) GetDocLinkForFunctionInputOrOutputType(pkg *schema.Pa
func (d DocLanguageHelper) GetLanguageTypeString(pkg *schema.Package, moduleName string, t schema.Type, input bool) string {
typeDetails := map[*schema.ObjectType]*typeDetails{}
mod := &modContext{
pkg: pkg,
pkg: pkg.Reference(),
mod: moduleName,
typeDetails: typeDetails,
}
Expand Down Expand Up @@ -114,7 +114,7 @@ func (d DocLanguageHelper) GetMethodResultName(pkg *schema.Package, modName stri
if info.LiftSingleValueMethodReturns && m.Function.Outputs != nil && len(m.Function.Outputs.Properties) == 1 {
typeDetails := map[*schema.ObjectType]*typeDetails{}
mod := &modContext{
pkg: pkg,
pkg: pkg.Reference(),
mod: modName,
typeDetails: typeDetails,
}
Expand Down

0 comments on commit ef58dcc

Please sign in to comment.