As a part of a docstring.
(self)
| 641 | |
| 642 | @joiner |
| 643 | def as_doc(self) -> Iterator[str]: |
| 644 | """As a part of a docstring.""" |
| 645 | yield f"{self.name}:" |
| 646 | if self.description: |
| 647 | for line in self.description.split("\n"): |
| 648 | yield from wrap_indent(line) |
| 649 | if self.deprecated is not None: |
| 650 | directive = ".. deprecated::" |
| 651 | if self.deprecated: |
| 652 | directive = f"{directive} {self.deprecated}" |
| 653 | yield from wrap_indent(directive) |
| 654 | |
| 655 | def as_arg(self) -> str: |
| 656 | """As a Arg object for the query builder.""" |