Open bernt-matthias opened 4 years ago
Hmm, both strings should be separately passed to infer_type
. Are you sure this isn't happening?
Yes, so currently we call it 3 times for a flag like this. Once on the flag name (a
in this case), once on the argument (FILE
in this case), and finally once on the full description string: https://github.com/aCLImatise/CliHelpParser/blob/017bfe01dab6eb133deaf6f64060277233dfa200/acclimatise/model.py#L294-L304.
If you think you have found a smarter way to combine this information, feel free to edit the Flag.get_type()
method, add a test case, and submit it as a PR.
Maybe something like this: https://github.com/aCLImatise/CliHelpParser/pull/38
For instance, for the following parameter from samtools sort:
only
"FILE"
is sent to the regular expressions. But in order to make https://github.com/aCLImatise/CliHelpParser/pull/15 work also the description would be needed.