keleshev / docopt-dispatch

Dispatch from command-line arguments to functions
MIT License
20 stars 2 forks source link

Populate kwargs only with data relevant to dispatched function #10

Open bittner opened 1 year ago

bittner commented 1 year ago

Problem

docopt-dispatch sends the full kwargs dictionary to dispatched functions. When several CLI calls are specified, not all values are relevant to the dispatched function, though.

Proposed solution (Feature request)

The kwargs argument in the dispatched function should only contain the key-values pairs that are relevant to the call that was identified from the specification.

Relates to bug #4.

bittner commented 1 year ago

@keleshev Any opinion on this?