Remove unused kw-only-args related code.
KeywordCallTemplate is not used with Python based static keywords and
thus kw-only-args related changes done in PR aren't needed there
yet.  Situation changes when kw-only-arg support is added to user
keywords or to the dynamic API.
@@ -35,12 +35,10 @@ class KeywordCallTemplate(object):
def __init__(self, argspec):
self._positional = argspec.positional
self._supports_kwargs = bool(argspec.kwargs)
- self._supports_kwoargs = bool(argspec.kwonlyargs)
self._supports_named = argspec.supports_named
self.args = [None] * argspec.minargs \
+ [DefaultValue(d) for d in argspec.defaults]
- # We don't need DefaultValues' for kwargs; rf allows multiple keys for kwargs and the last takes priority
- self.kwargs = [(key, value) for key, value in argspec.kwonlydefaults.items()]
+ self.kwargs = []
def fill_positional(self, positional):
self.args[:len(positional)] = positional
@@ -50,7 +48,7 @@ class KeywordCallTemplate(object):
if name in self._positional and self._supports_named:
index = self._positional.index(name)
self.args[index] = value
- elif self._supports_kwargs or self._supports_kwoargs:
+ elif self._supports_kwargs:
self.kwargs.append((name, value))
else:
raise DataError("Non-existing named argument '%s'." % name)
