File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 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) {
7878 // must be accounted for.
7979 context .writerDelegator ().useFileWriter (resolver .getDefinitionFile (), resolver .getNamespace (), writer -> {
8080 writer .addDependency (SmithyPythonDependency .SMITHY_HTTP );
81- writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "_AuthOption " );
81+ writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "AuthOptionProtocol " );
8282 writer .addImports ("smithy_core.auth" , Set .of ("AuthOption" , "AuthParams" ));
8383 writer .pushState ();
8484
8585 writer .write ("""
86- def $1L(auth_params: AuthParams[Any, Any]) -> _AuthOption | None:
86+ def $1L(auth_params: AuthParams[Any, Any]) -> AuthOptionProtocol | None:
8787 return AuthOption(
8888 scheme_id=$2S,
8989 identity_properties={}, # type: ignore
Original file line number Diff line number Diff line change @@ -71,12 +71,12 @@ private void generateAuthSchemeResolver(
7171 writer .pushState (new GenerateHttpAuthSchemeResolverSection (resolvedAuthSchemes ));
7272 writer .addDependency (SmithyPythonDependency .SMITHY_CORE );
7373 writer .addDependency (SmithyPythonDependency .SMITHY_HTTP );
74- writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "_AuthOption " );
74+ writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "AuthOptionProtocol " );
7575 writer .addImport ("smithy_core.auth" , "AuthParams" );
7676 writer .addStdlibImport ("typing" , "Any" );
7777 writer .write ("""
7878 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 ]:
8080 auth_options: list[_AuthOption] = []
8181
8282 ${2C|}
Original file line number Diff line number Diff line change @@ -85,13 +85,13 @@ public void customize(GenerationContext context) {
8585 context .writerDelegator ().useFileWriter (resolver .getDefinitionFile (), resolver .getNamespace (), writer -> {
8686 writer .addDependency (SmithyPythonDependency .SMITHY_CORE );
8787 writer .addDependency (SmithyPythonDependency .SMITHY_HTTP );
88- writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "_AuthOption " );
88+ writer .addImport ("smithy_core.interfaces.auth" , "AuthOption" , "AuthOptionProtocol " );
8989 writer .addImports ("smithy_core.auth" , Set .of ("AuthOption" , "AuthParams" ));
9090 writer .addImport ("smithy_core.shapes" , "ShapeID" );
9191 writer .addStdlibImport ("typing" , "Any" );
9292 writer .pushState ();
9393 writer .write ("""
94- def $1L(auth_params: AuthParams[Any, Any]) -> _AuthOption | None:
94+ def $1L(auth_params: AuthParams[Any, Any]) -> AuthOptionProtocol | None:
9595 return AuthOption(
9696 scheme_id=ShapeID($2S),
9797 identity_properties={}, # type: ignore
You can’t perform that action at this time.
0 commit comments