argparse `MetavarTypeHelpFormatter` not available in ConfigArgParse
cruisen opened this issue · comments
Cruisen commented
Missing Formater
MetavarTypeHelpFormatter
is part of argparse
Error
-
However
MetavarTypeHelpFormatter
is not available inConfigArgParse
-
It actually fails on import:
ImportError: cannot import name 'MetavarTypeHelpFormatter' from 'configargparse'
PR wanted?
- I was able to patch https://github.com/bw2/ConfigArgParse/blob/master/configargparse.py
Note
- As a side effect I found a bug on
argparse
itself. It fails ifMetavarTypeHelpFormatter
is used and an argument does not have an type argument:
AttributeError: 'NoneType' object has no attribute '__name__'
- I will raise an Issue, maybe a PR there as well.
Cruisen commented
This was an issue on my misunderstanding. Hence a user error.
Fix is:
from argparse import MetavarTypeHelpFormatter
-> Closing the issue.