Skip to content

CylcOptionParser(..., auto_add=True) is broken #7251

@wxtim

Description

@wxtim

Description

CylcOptionParser's auto_add= keyword argument is broken. CLI scripts using it will fail.

Reproducible Example

Add the following diff (any script will do, I've just happened to have picked Cat-Log)

--- a/cylc/flow/scripts/cat_log.py
+++ b/cylc/flow/scripts/cat_log.py
@@ -318,7 +318,8 @@ def get_option_parser() -> COP:
         __doc__,
         argdoc=[
             ID_MULTI_ARG_DOC,
-        ]
+        ],
+        auto_add=False,
     )
 
     parser.add_option(

Then try using the script

> cylc log myworkflow
...

Assorted traceback

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is wrong :(small

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions