compiler: do not overwrite top level __init__.py

Resolves: #168 #260
This commit is contained in:
James Hilton-Balfe 2022-04-24 00:44:16 +01:00 committed by GitHub
parent 3ca092a724
commit 6a70b8e8ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,6 +131,7 @@ def generate_code(request: CodeGeneratorRequest) -> CodeGeneratorResponse:
directory.joinpath("__init__.py")
for path in output_paths
for directory in path.parents
if not directory.joinpath("__init__.py").exists()
} - output_paths
for init_file in init_files: