argh icon indicating copy to clipboard operation
argh copied to clipboard

An argparse wrapper that doesn't make you say "argh" each time you deal with it.

Results 73 argh issues
Sort by recently updated
recently updated
newest added

Could you please consider to use unittest.mock instead of mock, either exclusively or optionally?

A simple PR to update dev dependencies and ensure (via `tox` and GitHub Actions) that the tests run under supported Python versions [Example output from GitHub Actions](https://github.com/wellmaintained/argh/actions/runs/2183457336) ![image](https://user-images.githubusercontent.com/227505/163797411-e3cb1485-0acd-405a-820e-ec679f6eb059.png)

I have a wrapper function: ``` def wrapper(**kwargs): try: myfunc(**kwargs) except: pass ``` and my desired function: ``` def myfunc(a="1", b="2"): print(a) print(b) ``` I would like to do something...

How to specify a list of "arguments" with typing hints ? ```python import argh from typing import List @argh.arg( '-i', '--input_files', nargs='+', help='list of input files' ) def main (...

component-assembling
design

Was discovered at https://github.com/NixOS/nixpkgs/pull/136254#issuecomment-934690806 on NixOS after python update from 3.9.6 to 3.9.7. Two tests started failing. Posting full build log: ``` Sourcing pytest-remove-bytecode-hook.sh Sourcing python-remove-tests-dir-hook Sourcing python-catch-conflicts-hook.sh Sourcing python-remove-bin-bytecode-hook.sh...

https://github.com/neithere/argh/blob/dcd3253f2994400a6a58a700c118c53765bc50a4/argh/dispatching.py#L152 Python 3.8 `parser.parse_known_args` return a tuple of (Namespace, list), while `parser.parse_args` return a Namespace. Below is my modification: ```python if skip_unknown_args: namespace_obj, _ = parser.parse_known_args(argv, namespace=namespace) else: namespace_obj =...

A lot of CLIs with boolean flags have two versions of a flag, e.g. `bq --help` shows options like `--[no]debug_trace`, which allows the user to explicitly set either a true...

component-decorators
needs-design
looks-like-plugin

First of all, THANKS @neithere for this awesome project, it's never been easier to set up a command line tool! Just wanted to check on you to see how you...

enhancement
needs use cases
needs-design

I was pleased to find that [there is completion](https://argh.readthedocs.io/en/latest/reference.html) after the initial disappointment in empty results from [searching for completion](https://argh.readthedocs.io/en/latest/search.html?q=completion). Thanks for this project.

### Background Argh follows Argparse's grouping of arguments into two bunches: - "Positional" = determined by position and required (possibly optional with `nargs` set to `?` or `*`) - "Optional"...

enhancement
component-assembling