Skip to content

Commit 3e0fdcc

Browse files
committed
Use _py_proto suffix, to align with java, go naming schemes
1 parent b3805a9 commit 3e0fdcc

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

gazelle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ proto_library(
513513
)
514514

515515
py_proto_library(
516-
name = "foo_proto_py_pb2",
516+
name = "foo_py_proto",
517517
visibility = ["//:__subpackages__"],
518518
deps = [":foo_proto"],
519519
)

gazelle/python/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ func generateProtoLibraries(args language.GenerateArgs, pythonProjectRoot string
580580
emptySiblings := treeset.Set{}
581581
// Generate a py_proto_library for each proto_library.
582582
for _, protoRuleName := range protoRuleNames {
583-
pyProtoLibraryName := protoRuleName + "_py_pb2"
583+
pyProtoLibraryName := strings.TrimSuffix(protoRuleName, "_proto") + "_py_proto"
584584
pyProtoLibrary := newTargetBuilder(pyProtoLibraryKind, pyProtoLibraryName, pythonProjectRoot, args.Rel, &emptySiblings).
585585
addVisibility(visibility).
586586
addResolvedDependency(":" + protoRuleName).

gazelle/python/testdata/directive_python_generate_proto/test5_enabled_with_proto/BUILD.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ proto_library(
1010
)
1111

1212
py_proto_library(
13-
name = "foo_proto_py_pb2",
13+
name = "foo_py_proto",
1414
visibility = ["//:__subpackages__"],
1515
deps = [":foo_proto"],
1616
)

gazelle/python/testdata/directive_python_generate_proto/test7_removes_when_unnecessary/BUILD.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ proto_library(
1010
)
1111

1212
py_proto_library(
13-
name = "foo_proto_py_pb2",
13+
name = "foo_py_proto",
1414
visibility = ["//:__subpackages__"],
1515
deps = [":foo_proto"],
1616
)

gazelle/python/testdata/directive_python_generate_proto/test8_disabled_ignores_py_proto_library/BUILD.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ proto_library(
1010
)
1111

1212
py_proto_library(
13-
name = "foo_proto_py_pb2",
13+
name = "foo_py_proto",
1414
visibility = ["//:__subpackages__"],
1515
deps = [":foo_proto"],
1616
)

gazelle/python/testdata/directive_python_generate_proto/test8_disabled_ignores_py_proto_library/BUILD.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ proto_library(
1010
)
1111

1212
py_proto_library(
13-
name = "foo_proto_py_pb2",
13+
name = "foo_py_proto",
1414
visibility = ["//:__subpackages__"],
1515
deps = [":foo_proto"],
1616
)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy