Skip to content

Commit 2878c0d

Browse files
committed
Remove some unused stuff
1 parent 083f3ee commit 2878c0d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

gazelle/python/generate.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,15 +574,13 @@ func ensureNoCollision(file *rule.File, targetName, kind string) error {
574574
func generateProtoLibraries(args language.GenerateArgs, cfg *pythonconfig.Config, pythonProjectRoot string, visibility []string, res *language.GenerateResult) {
575575
// First, enumerate all the proto_library in this package.
576576
var protoRuleNames []string
577-
protoRules := map[string]*rule.Rule{}
578577
protoRel := map[string]string{}
579578

580579
for _, r := range args.OtherGen {
581580
if r.Kind() != "proto_library" {
582581
continue
583582
}
584583
protoRuleNames = append(protoRuleNames, r.Name())
585-
protoRules[r.Name()] = r
586584
protoRel[r.Name()] = args.Rel
587585
}
588586
sort.Strings(protoRuleNames)

gazelle/python/resolve.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func importsProtoLibrary(cfg *pythonconfig.Config, r *rule.Rule) []resolve.Impor
137137
protoRuleAttr := r.PrivateAttr(protoKey)
138138
protoRelAttr := r.PrivateAttr(protoRelKey)
139139
if protoRuleAttr == nil || protoRelAttr == nil {
140-
return specs
140+
return nil
141141
}
142142

143143
protoRule := protoRuleAttr.(string)

0 commit comments

Comments
 (0)