Lines Matching refs:adapter
130 def adapt(self, adapter):
131 """Run adapter on each known symbol and (de)activate it accordingly.
133 `adapter` must be a function that returns a boolean. It is called as
134 `adapter(name, active, section)` for each setting, where `active` is
137 `adapter` returns `True`, then set `name` (i.e. make it active),
141 setting.active = adapter(setting.name, setting.active,
247 """Config adapter for "full"."""
285 """Config adapter for "baremetal"."""
322 def crypto_adapter(adapter):
323 """Modify an adapter to disable non-crypto symbols.
325 ``crypto_adapter(adapter)(name, active, section)`` is like
326 ``adapter(name, active, section)``, but unsets all X.509 and TLS symbols.
331 if adapter is None:
333 return adapter(name, active, section)
339 def no_deprecated_adapter(adapter):
340 """Modify an adapter to disable deprecated symbols.
342 ``no_deprecated_adapter(adapter)(name, active, section)`` is like
343 ``adapter(name, active, section)``, but unsets all deprecated symbols
351 if adapter is None:
353 return adapter(name, active, section)
356 def no_platform_adapter(adapter):
357 """Modify an adapter to disable platform symbols.
359 ``no_platform_adapter(adapter)(name, active, section)`` is like
360 ``adapter(name, active, section)``, but unsets all platform symbols other
367 if adapter is None:
369 return adapter(name, active, section)
538 subparser.set_defaults(adapter=function)
595 config.adapt(args.adapter)