Skip to content

Commit 24cee46

Browse files
committed
Remove entrypoint requirements to generate .py files
1 parent 3ae39ee commit 24cee46

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

gazelle/python/generate.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ func (py *Python) GenerateRules(args language.GenerateArgs) language.GenerateRes
170170
// 2. The directory has a BUILD or BUILD.bazel files. Then
171171
// it doesn't matter at all what it has since it's a
172172
// separate Bazel package.
173-
// 3. (only for package generation) The directory has an
174-
// __init__.py, __main__.py or __test__.py, meaning a
175-
// BUILD file will be generated.
176173
if cfg.PerFileGeneration() {
177174
return fs.SkipDir
178175
}
@@ -182,7 +179,7 @@ func (py *Python) GenerateRules(args language.GenerateArgs) language.GenerateRes
182179
return nil
183180
}
184181

185-
if !cfg.CoarseGrainedGeneration() && hasEntrypointFile(path) {
182+
if !cfg.CoarseGrainedGeneration() {
186183
return fs.SkipDir
187184
}
188185

0 commit comments

Comments
 (0)