Skip to content

Commit 6a70b8e

Browse files
authored
compiler: do not overwrite top level __init__.py
Resolves: #168 #260
1 parent 3ca092a commit 6a70b8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/betterproto/plugin/parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def generate_code(request: CodeGeneratorRequest) -> CodeGeneratorResponse:
131131
directory.joinpath("__init__.py")
132132
for path in output_paths
133133
for directory in path.parents
134+
if not directory.joinpath("__init__.py").exists()
134135
} - output_paths
135136

136137
for init_file in init_files:

0 commit comments

Comments
 (0)