Generate the docstring for this return.
(self)
| 562 | return ann |
| 563 | |
| 564 | def generate_doc(self): |
| 565 | """Generate the docstring for this return.""" |
| 566 | if self.description: |
| 567 | doc = self.description.replace("\n", " ") |
| 568 | if self.optional: |
| 569 | doc = f"*(Optional)* {doc}" |
| 570 | else: |
| 571 | doc = "" |
| 572 | return doc |
| 573 | |
| 574 | def generate_return(self, dict_): |
| 575 | """Generate code for returning this value.""" |