def get_options()

in pantri/scripts/pantri.py [0:0]


def get_options(args: Namespace) -> Dict[Any, Any]:
    """ Convert cli args into dictionary """
    options = {}
    for arg, value in vars(args).items():
        # Dont include the func arg and null values
        if arg != "func" and value:
            options.update({arg: value})

        # Add method name ie retrieve or store to options
        if arg == "func":
            options.update({"method": value.__name__})

    return options