garak.buffs.base

Base classes for buffs.

class garak.buffs.base.Buff(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)

Bases: Configurable

Base class for a buff.

A buff should take as input a list of attempts, and return a list of events. It should be able to return a generator. It’s worth storing the origin attempt ID in the notes attrib of derivative attempt objects.

DEFAULT_PARAMS = {}
active = True
bcp47 = None
buff(source_attempts: List[Attempt], probename='') Iterable[Attempt]
doc_uri = ''
transform(attempt: Attempt) Iterable[Attempt]

attempt copying is handled elsewhere. isn’t that nice

untransform(attempt: Attempt) Attempt

Only necessary if buff requires a post buff hook