aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/python_generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/python_generator.cc')
-rw-r--r--src/compiler/python_generator.cc23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc
index b7a3115bce..753fe1c888 100644
--- a/src/compiler/python_generator.cc
+++ b/src/compiler/python_generator.cc
@@ -467,7 +467,7 @@ bool PrivateGenerator::PrintStub(
out->Print(
method_dict,
"response_deserializer=$ResponseModuleAndClass$.FromString,\n");
- out->Print("_registered_method=True)\n");
+ out->Print(")\n");
}
}
}
@@ -642,27 +642,22 @@ bool PrivateGenerator::PrintServiceClass(
args_dict["ArityMethodName"] = arity_method_name;
args_dict["PackageQualifiedService"] = package_qualified_service_name;
args_dict["Method"] = method->name();
- out->Print(args_dict, "return grpc.experimental.$ArityMethodName$(\n");
+ out->Print(args_dict,
+ "return "
+ "grpc.experimental.$ArityMethodName$($RequestParameter$, "
+ "target, '/$PackageQualifiedService$/$Method$',\n");
{
IndentScope continuation_indent(out);
StringMap serializer_dict;
- out->Print(args_dict, "$RequestParameter$,\n");
- out->Print("target,\n");
- out->Print(args_dict, "'/$PackageQualifiedService$/$Method$',\n");
serializer_dict["RequestModuleAndClass"] = request_module_and_class;
serializer_dict["ResponseModuleAndClass"] = response_module_and_class;
out->Print(serializer_dict,
"$RequestModuleAndClass$.SerializeToString,\n");
out->Print(serializer_dict, "$ResponseModuleAndClass$.FromString,\n");
- out->Print("options,\n");
- out->Print("channel_credentials,\n");
- out->Print("insecure,\n");
- out->Print("call_credentials,\n");
- out->Print("compression,\n");
- out->Print("wait_for_ready,\n");
- out->Print("timeout,\n");
- out->Print("metadata,\n");
- out->Print("_registered_method=True)\n");
+ out->Print("options, channel_credentials,\n");
+ out->Print(
+ "insecure, call_credentials, compression, wait_for_ready, "
+ "timeout, metadata)\n");
}
}
}