aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/python_generator.cc
diff options
context:
space:
mode:
authorGravatar Nathaniel Manista <nathaniel@google.com>2017-03-23 07:48:15 -0700
committerGravatar GitHub <noreply@github.com>2017-03-23 07:48:15 -0700
commit209c41adb63e5194bc8f12649cbc33456189dceb (patch)
tree6c97fc405966f0981dd8d1b1e126e1a817b6ef6d /src/compiler/python_generator.cc
parent55837563c94cb78ba9d0ee5ee75f3be35cdd415b (diff)
parent2f390dbb026b2e8a3b64e9273b2ade3f8af66585 (diff)
Merge pull request #10255 from nathanielmanistaatgoogle/_pb2_grpc-unnecessary-imports
Drop unnecessary framework imports from generated _pb2_grpc.py files.
Diffstat (limited to 'src/compiler/python_generator.cc')
-rw-r--r--src/compiler/python_generator.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc
index 242ce06a16..49d90fd36e 100644
--- a/src/compiler/python_generator.cc
+++ b/src/compiler/python_generator.cc
@@ -647,15 +647,15 @@ bool PrivateGenerator::PrintBetaPreamble() {
"Package", config.beta_package_root);
out->Print("from $Package$ import interfaces as beta_interfaces\n", "Package",
config.beta_package_root);
+ out->Print("from grpc.framework.common import cardinality\n");
+ out->Print(
+ "from grpc.framework.interfaces.face import utilities as "
+ "face_utilities\n");
return true;
}
bool PrivateGenerator::PrintPreamble() {
out->Print("import $Package$\n", "Package", config.grpc_package_root);
- out->Print("from grpc.framework.common import cardinality\n");
- out->Print(
- "from grpc.framework.interfaces.face import utilities as "
- "face_utilities\n");
if (generate_in_pb2_grpc) {
out->Print("\n");
StringPairSet imports_set;