Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_objs(self):
# Basic type conversion
if self.timeout is not None:
self.objs["timeout"] = datetime.timedelta(seconds=int(self.timeout))
self.objs["format"] = {
key: pydoc.locate(value) for key, value in self.format.items()
}
# Checkers do not depend on anything
self.objs["checker"] = self(_fwd.registry.get_named(self.checker, Checker))
# Searchers only depend on checkers
self.objs["searcher"] = self(_fwd.registry.get_named(self.searcher, Searcher))
def update_param(self, owner: str, name: str, value: Optional[Any]):
if value is None:
return
target = self.params.setdefault(owner, {})
if _fwd.registry.get_named(owner).getParams()[name].list:
target.setdefault(name, []).append(value)
else:
target[name] = value