1#!/usr/bin/python3
2
3# Copyright 2019 IBM Corp.
4
5from argparse import ArgumentParser
6
7import yaml
8
9if __name__ == "__main__":
10    # A simple program to ensure proper indents of input yaml file
11    parser = ArgumentParser(description="YAML formatter")
12    parser.add_argument(
13        "-f", "--file", dest="file_yaml", help="yaml file to format"
14    )
15    args = parser.parse_args()
16
17    print(
18        yaml.dump(
19            yaml.load(open(args.file_yaml), Loader=yaml.FullLoader), indent=4
20        )
21    )
22