<https://github.com/pantsbuild/pants/pull/9280> &l...
# development
a
https://github.com/pantsbuild/pants/pull/9280 <= this is a way to register options declaratively, while coupling them with a well-typed accessor method, e.g.:
Copy code
@property                   # type: ignore[misc]
    @option(
        "--generate-ipex",
        advanced=True,
        fingerprint=True,
        ...
    )
    def _generate_ipex(self) -> bool:
        return cast(bool, self.get_options().generate_ipex)
this would take the place of a manual
register('--generate-ipex', ...)
call, and it draws the
type
argument for
register()
from the return type of the method! this was just a fun idea, but i also think it's worth trying, and i would love to hear anyone's thoughts on whether this is helpful, or if it's confusing!! no rush to review -- i tagged a ton of people to get a bunch of thoughts!