code: def anno_parser(func):
      "Look at params (annotated with `Param`) in func and return an `ArgumentParser`"
      p = ArgumentParser(description=func.__doc__)
      for k,v in inspect.signature(func).parameters.items():
          param = func.__annotations__.get(k, Param())
          kwargs = param.kwargs
          if v.default != inspect.Parameter.empty: kwargs['default'] = v.default
          p.add_argument(f"{param.pre}{k}", **kwargs)
      return f anno_parser(func):
      "Look at params (annotated with `Param`) in func and return an `ArgumentParser`"
      p = ArgumentParser(description=func.__doc__)
      for k,v in inspect.signature(func).parameters.items():
          param = func.__annotations__.get(k, Param())
          kwargs = param.kwargs
          if v.default != inspect.Parameter.empty: kwargs['default'] = v.default
          p.add_argument(f"{param.pre}{k}", **kwargs)
      return p
docs: Look at params (annotated with `Param`) in func and return an `ArgumentParser`