| 742 | raise SourceNotFound(msg) |
| 743 | |
| 744 | def set_docstring(self) -> None: |
| 745 | self.docstring = None |
| 746 | if not self.get_args(): |
| 747 | self.funcprops = None |
| 748 | if self.current_func is not None: |
| 749 | try: |
| 750 | self.docstring = pydoc.getdoc(self.current_func) |
| 751 | except IndexError: |
| 752 | self.docstring = None |
| 753 | else: |
| 754 | # pydoc.getdoc() returns an empty string if no |
| 755 | # docstring was found |
| 756 | if not self.docstring: |
| 757 | self.docstring = None |
| 758 | |
| 759 | # What complete() does: |
| 760 | # Should we show the completion box? (are there matches, or is there a |