Method
add_option
(
self,
name: str,
typespec: type | object,
default: Any,
help: str,
choices: Sequence[str] | None = None,
)
Source from the content-addressed store, hash-verified
| 120 | self._options: dict[str, Any] = {} |
| 121 | |
| 122 | def add_option( |
| 123 | self, |
| 124 | name: str, |
| 125 | typespec: type | object, |
| 126 | default: Any, |
| 127 | help: str, |
| 128 | choices: Sequence[str] | None = None, |
| 129 | ) -> None: |
| 130 | self._options[name] = _Option(name, typespec, default, help, choices) |
| 131 | self.changed.send(updated={name}) |
| 132 | |
| 133 | @contextlib.contextmanager |
| 134 | def rollback(self, updated, reraise=False): |
Callers
nothing calls this directly
Tested by
no test coverage detected