diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index 8f779f832..63035a4fc 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -638,7 +638,7 @@ def _raw_main(args, load_config=True): # Parse the command-line! options, subcommand, suboptions, subargs = parser.parse_args(args) - config.add_args(options) + config.set_args(options) # Open library file. dbpath = config['library'].as_filename() diff --git a/beets/ui/commands.py b/beets/ui/commands.py index ed535cbc8..25edd20ca 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -685,7 +685,7 @@ import_cmd.parser.add_option('-i', '--incremental', dest='incremental', import_cmd.parser.add_option('-I', '--noincremental', dest='incremental', action='store_false', help='do not skip already-imported directories') def import_func(lib, opts, args): - config['import'].add_args(opts) + config['import'].set_args(opts) # Special case: --copy flag suppresses import_move (which would # otherwise take precedence). diff --git a/beets/util/confit.py b/beets/util/confit.py index d1f6f4f93..7a034c9cc 100644 --- a/beets/util/confit.py +++ b/beets/util/confit.py @@ -140,14 +140,16 @@ class ConfigView(object): return value def add(self, value): - """Add a value as a source for configuration data. The object as - added as the lowest-priority source. This can be used to - dynamically extend the defaults. + """Set the *default* value for this configuration view. The + specified value is added as the lowest-priority configuration + data source. """ raise NotImplementedError def set(self, value): - """Create an overlay source to set the value at this view. + """*Override* the value for this configuration view. The + specified value is added as the highest-priority configuration + data source. """ raise NotImplementedError @@ -164,7 +166,7 @@ class ConfigView(object): """ self.set({key: value}) - def add_args(self, namespace): + def set_args(self, namespace): """Overlay parsed command-line arguments, generated by a library like argparse or optparse, onto this view's value. """