add example kwargs

This commit is contained in:
Antonio J. Delgado 2023-02-23 23:23:04 +02:00
parent a78c9b5a65
commit 03bd2e7dc8

View file

@ -14,7 +14,7 @@ from logging.handlers import SysLogHandler
class __project_codename__:
def __init__(self, debug_level, log_file):
def __init__(self, debug_level, log_file, **kwargs):
''' Initial function called when object is created '''
self.config = dict()
self.config['debug_level'] = debug_level
@ -63,8 +63,8 @@ class __project_codename__:
@click.option('--log-file', '-l', help="File to store all debug messages.")
#@click.option("--dummy","-n" is_flag=True, help="Don't do anything, just show what would be done.") # Don't forget to add dummy to parameters of main function
@click_config_file.configuration_option()
def __main__(debug_level, log_file):
return __project_codename__(debug_level, log_file)
def __main__(debug_level, log_file, **kwargs):
return __project_codename__(debug_level, log_file, **kwargs)
if __name__ == "__main__":
__main__()