The doc says:
:param Optional[bool] auto_attribs: If set to `True` or `False`, it behaves
exactly like `attr.s`. If left `None`, `attr.s` will try to guess:
1. If all attributes are annotated and no `attr.ib` is found, it assumes
*auto_attribs=True*.
2. Otherwise it assumes *auto_attribs=False* and tries to collect
`attr.ib`\ s.
Sadly it doesn't exactly work.
import attr
@attr.define()
class Trigger:
a = attr.field()
The code does this:
try:
return do_it(True)
except UnannotatedAttributeError:
return do_it(False)
But do_it itself won't raise UnannotatedAttributeError until the decorator is applied to the class.