File tree 3 files changed +6
-6
lines changed
aws/core/src/main/java/software/amazon/smithy/python/aws/codegen
core/src/main/java/software/amazon/smithy/python/codegen 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,12 @@ public void customize(GenerationContext context) {
78
78
// must be accounted for.
79
79
context .writerDelegator ().useFileWriter (resolver .getDefinitionFile (), resolver .getNamespace (), writer -> {
80
80
writer .addDependency (SmithyPythonDependency .SMITHY_HTTP );
81
- writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "_AuthOption " );
81
+ writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "AuthOptionProtocol " );
82
82
writer .addImports ("smithy_core.auth" , Set .of ("AuthOption" , "AuthParams" ));
83
83
writer .pushState ();
84
84
85
85
writer .write ("""
86
- def $1L(auth_params: AuthParams[Any, Any]) -> _AuthOption | None:
86
+ def $1L(auth_params: AuthParams[Any, Any]) -> AuthOptionProtocol | None:
87
87
return AuthOption(
88
88
scheme_id=$2S,
89
89
identity_properties={}, # type: ignore
Original file line number Diff line number Diff line change @@ -71,12 +71,12 @@ private void generateAuthSchemeResolver(
71
71
writer .pushState (new GenerateHttpAuthSchemeResolverSection (resolvedAuthSchemes ));
72
72
writer .addDependency (SmithyPythonDependency .SMITHY_CORE );
73
73
writer .addDependency (SmithyPythonDependency .SMITHY_HTTP );
74
- writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "_AuthOption " );
74
+ writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "AuthOptionProtocol " );
75
75
writer .addImport ("smithy_core.auth" , "AuthParams" );
76
76
writer .addStdlibImport ("typing" , "Any" );
77
77
writer .write ("""
78
78
class $1L:
79
- def resolve_auth_scheme(self, auth_parameters: AuthParams[Any, Any]) -> list[_AuthOption ]:
79
+ def resolve_auth_scheme(self, auth_parameters: AuthParams[Any, Any]) -> list[AuthOptionProtocol ]:
80
80
auth_options: list[_AuthOption] = []
81
81
82
82
${2C|}
Original file line number Diff line number Diff line change @@ -85,13 +85,13 @@ public void customize(GenerationContext context) {
85
85
context .writerDelegator ().useFileWriter (resolver .getDefinitionFile (), resolver .getNamespace (), writer -> {
86
86
writer .addDependency (SmithyPythonDependency .SMITHY_CORE );
87
87
writer .addDependency (SmithyPythonDependency .SMITHY_HTTP );
88
- writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "_AuthOption " );
88
+ writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "AuthOptionProtocol " );
89
89
writer .addImports ("smithy_core.auth" , Set .of ("AuthOption" , "AuthParams" ));
90
90
writer .addImport ("smithy_core.shapes" , "ShapeID" );
91
91
writer .addStdlibImport ("typing" , "Any" );
92
92
writer .pushState ();
93
93
writer .write ("""
94
- def $1L(auth_params: AuthParams[Any, Any]) -> _AuthOption | None:
94
+ def $1L(auth_params: AuthParams[Any, Any]) -> AuthOptionProtocol | None:
95
95
return AuthOption(
96
96
scheme_id=ShapeID($2S),
97
97
identity_properties={}, # type: ignore
You can’t perform that action at this time.
0 commit comments