I am trying to make a Secret arg optional. So I set it like
arty_token: Annotated[
dagger.Secret,
Doc("Artifactory token for authentication"),
]
| None,
Then validate if it's not None and set it. However, I get runtime errors from beartype.
BeartypeDecorHintNonpepException: Is_bearable() type hint
typing.Optional[dagger.Secret] invalid or unrecognized. This hint is either:
* PEP-noncompliant (and thus invalid). This is your bad. Rejoice! @beartype
isn't to blame for once.
* PEP-compliant but currently unsupported by @beartype (and thus unrecognized).
This is our bad. Disaster! @beartype is to blame like always. You suddenly feel
encouraged to submit a feature request for this unsupported hint to our friendly
issue tracker at:
https://github.com/beartype/beartype/issues
What am I doing wrong? I am a python newbie so this is taking me for a loop 😦