From d9f2fd3009e5f9b734aacdae3ee82d6b5e4c1467 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Thu, 12 Jul 2018 16:25:26 +0200 Subject: [PATCH] config: Change remove() to discard() to allow overriding value using simple attributes. --- bonobo/config/configurables.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bonobo/config/configurables.py b/bonobo/config/configurables.py index eedd6ed..20ceca5 100644 --- a/bonobo/config/configurables.py +++ b/bonobo/config/configurables.py @@ -140,15 +140,14 @@ class Configurable(metaclass=ConfigurableMeta): break # option orders make all positional options first, job done. if not isoption(getattr(cls, name)): - missing.remove(name) + missing.discard(name) continue if len(args) <= position: break # no more positional arguments given. position += 1 - if name in missing: - missing.remove(name) + missing.discard(name) # complain if there is more options than possible. extraneous = set(kwargs.keys()) - (set(next(zip(*options))) if len(options) else set())