jonathanhaigh / multiconfparse

Python 3 library for obtaining configuration from multiple sources
MIT License
1 stars 1 forks source link

Simplify default handling for actions #62

Closed jonathanhaigh closed 4 years ago

jonathanhaigh commented 4 years ago

Currently each action must implement an apply_default() method. That was done so that the append action would not have to accumulate the default value into the final value for a config. Since then, I have found out that Argparse's append action does accumulate the default value into the final value for a command line parameter and this library has been updated to match Argparse's behaviour.

For simplicity of implementing new actions (which users might do themselves) and to make implementing new actions more similar to implementing Argparse actions, we should probably remove the need for an action class to implement apply_default().