pyontutils icon indicating copy to clipboard operation
pyontutils copied to clipboard

clifun args and defaults are backwards

Open tgbugs opened this issue 4 years ago • 1 comments

clifun.Options can be put to much wider use (e.g. when eventually moved to orthauth) by switching the order of args and defaults so that it can be imported from a module without being in main to supply args. That way any configuration of the docstring use auth and any other default options can be accessed without having to fiddle around with argv etc. This will be a fairly large change in the way init is handled.

tgbugs avatar Jul 06 '20 03:07 tgbugs

This allows the Options class to serve as the turing complete part of the configuration scheme which the conf files in orthauth explicitly do not allow, and would decouple it from docopt, even if not from the docopt output format (which is not an issue since it is a simple sane format).

tgbugs avatar Jul 06 '20 03:07 tgbugs