Make the future deep rearrangement of the code safe and easy.
Context
The increasingly common typing hints (#107) are changing the scope of Argh and making many things easier. Now it makes sense to rely on type hints and make type guessing (from defaults, choices, etc.) secondary or even optional/deprecated. This calls for a serious restructuring of the code. We'll want to test the following transformations separately:
building arg definitions from function signature (including type hints);
augmenting signature-derived argh definitions from the @arg decorator;
augmenting these further by guessing types from defaults/options when hints or explicit type aren't present;
processing return value, potentially according to typing hints (probably going through a deprecation cycle with the current solution + adding some hooks for custom handlers);
assembling multiple commands into parser(s).
Acceptance criteria
only public methods are tested; tests for private methods, if still relevant, are moved to public ones.
add more coverage on higher level, with actual use cases
Scope
In scope:
rearranging existing unit tests;
possibly increasing top-level coverage of currently supported cases.
Purpose
Make the future deep rearrangement of the code safe and easy.
Context
The increasingly common typing hints (#107) are changing the scope of Argh and making many things easier. Now it makes sense to rely on type hints and make type guessing (from defaults, choices, etc.) secondary or even optional/deprecated. This calls for a serious restructuring of the code. We'll want to test the following transformations separately:
@arg
decorator;type
aren't present;Acceptance criteria
Scope
In scope:
Out of scope: