taurus-org / taurus

Moved to https://gitlab.com/taurus-org/taurus
http://taurus-scada.org
43 stars 46 forks source link

Do not require the use of cmd_line_parser=None in TaurusApplication #1089

Closed cpascual closed 4 years ago

cpascual commented 4 years ago

TaurusApplication implicitly uses a optparse.OptionParser instance if it does not receive an explicit cmd_line_parser keyword argument. This is inconvenient because it forces the user to explicitly pass cmd_line_parser=None when using other mechanisms such as click or argparse to parse CLI options.

Change this so that, by default cmd_line_parser=None is assumed if not explicitly passed, but allow the user to revert to the old behaviour by setting IMPLICIT_OPTPARSE=True in tauruscustomsettings.

Also, fixes #1065

cpascual commented 4 years ago

Hi @taurus-org/integrators , could you please have a look at this PR?