Skip to content

Commit 43a48bd

Browse files
committed
update test
1 parent 0485e5f commit 43a48bd

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

gazelle/python/generate.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,7 @@ func (py *Python) GenerateRules(args language.GenerateArgs) language.GenerateRes
111111
hasConftestFile := false
112112

113113
testFileGlobs := cfg.TestFilePattern()
114-
filteredFiles := make(map[string]struct{})
115-
for _, f := range args.RegularFiles {
116-
filteredFiles[f] = struct{}{}
117-
}
114+
118115
for _, f := range args.RegularFiles {
119116
if cfg.IgnoresFile(filepath.Base(f)) {
120117
continue
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
load("@rules_python//python:defs.bzl", "py_library")
2+
3+
py_library(
4+
name = "keep_library",
5+
deps = ["//keep_binary:foo"],
6+
)
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
load("@rules_python//python:defs.bzl", "py_binary")
1+
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
22

33
py_binary(
44
name = "foo",
55
srcs = ["foo.py"],
66
visibility = ["//:__subpackages__"],
77
)
8+
9+
py_library(
10+
name = "keep_binary",
11+
srcs = ["foo.py"],
12+
visibility = ["//:__subpackages__"],
13+
)
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
load("@rules_python//python:defs.bzl", "py_binary")
1+
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
22

33
py_binary(
44
name = "foo",
55
srcs = ["foo.py"],
66
visibility = ["//:__subpackages__"],
77
)
8+
9+
py_library(
10+
name = "keep_binary",
11+
srcs = ["foo.py"],
12+
visibility = ["//:__subpackages__"],
13+
)

0 commit comments

Comments
 (0)