hamdanal / rich-argparse

A rich help formatter for argparse
https://pypi.org/project/rich-argparse/
MIT License
129 stars 11 forks source link

TypeError: must be real number, not str #49

Closed loulsb closed 1 year ago

loulsb commented 1 year ago

I get this error when I use richHelpFormatter with this code

from argparse import ArgumentParser
from rich_argparse import RichHelpFormatter
_p = ArgumentParser(prog= 'Comparator' ,
                    formatter_class = RichHelpFormatter)
_p.add_argument('resources',nargs='+')
_p.add_argument('-p','--precision', type=float , default=0.0005,
    help='The precision of the comparisons, %(default).10f by default.')
_a=vars( _p.parse_args() )
print( _a )