For anyone coming here from a search turns out I can just do:
import attrs
@attrs.define
class C:
val: int | str = attrs.field(validator=attrs.validators.instance_of((str, int)))
This may mypy doesn't complain and runtime behavior is unaffected