Skip to content

Commit

Permalink
Ensure to add an init file
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Jan 11, 2025
1 parent 9b04476 commit eb3f7e6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ def run(output_file, yaml_file, validation_module=''):
with open(output_file, 'w') as f:
f.write(code)

# Put an __init__.py file if one does not yet exist.
init_file = os.path.join(os.path.dirname(output_file), '__init__.py')
open(init_file, 'a').close()

def parse_args():
parser = argparse.ArgumentParser()
Expand Down

0 comments on commit eb3f7e6

Please sign in to comment.