|
1847 | 1847 | "| **Returns** | **int** | | |" |
1848 | 1848 | ], |
1849 | 1849 | "text/plain": [ |
1850 | | - "DocmentTbl(obj=<function _f at 0x135fa8c20>, dm={'a': {'docment': 'description of param a', 'anno': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>}, 'b': {'docment': 'description of param b', 'anno': <class 'bool'>, 'default': True}, 'c': {'docment': <class 'inspect._empty'>, 'anno': <class 'str'>, 'default': None}, 'return': {'docment': <class 'inspect._empty'>, 'anno': <class 'int'>, 'default': <class 'inspect._empty'>}}, verbose=True, returns=True, params=['a', 'b', 'c'])" |
| 1850 | + "DocmentTbl(obj=<function _f>, dm={'a': {'docment': 'description of param a', 'anno': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>}, 'b': {'docment': 'description of param b', 'anno': <class 'bool'>, 'default': True}, 'c': {'docment': <class 'inspect._empty'>, 'anno': <class 'str'>, 'default': None}, 'return': {'docment': <class 'inspect._empty'>, 'anno': <class 'int'>, 'default': <class 'inspect._empty'>}}, verbose=True, returns=True, params=['a', 'b', 'c'])" |
1851 | 1851 | ] |
1852 | 1852 | }, |
1853 | 1853 | "execution_count": null, |
|
1925 | 1925 | "| **Returns** | **str** | | **Result of doing it** |" |
1926 | 1926 | ], |
1927 | 1927 | "text/plain": [ |
1928 | | - "DocmentTbl(obj=<function _f at 0x136032840>, dm={'a': {'docment': <class 'inspect._empty'>, 'anno': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>}, 'b': {'docment': 'param b', 'anno': <class 'int'>, 'default': <class 'inspect._empty'>}, 'c': {'docment': 'param c', 'anno': <class 'str'>, 'default': 'foo'}, 'return': {'docment': 'Result of doing it', 'anno': <class 'str'>, 'default': <class 'inspect._empty'>}}, verbose=True, returns=True, params=['a', 'b', 'c'])" |
| 1928 | + "DocmentTbl(obj=<function _f>, dm={'a': {'docment': <class 'inspect._empty'>, 'anno': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>}, 'b': {'docment': 'param b', 'anno': <class 'int'>, 'default': <class 'inspect._empty'>}, 'c': {'docment': 'param c', 'anno': <class 'str'>, 'default': 'foo'}, 'return': {'docment': 'Result of doing it', 'anno': <class 'str'>, 'default': <class 'inspect._empty'>}}, verbose=True, returns=True, params=['a', 'b', 'c'])" |
1929 | 1929 | ] |
1930 | 1930 | }, |
1931 | 1931 | "execution_count": null, |
|
2018 | 2018 | "| d | bool | True | description of param d |" |
2019 | 2019 | ], |
2020 | 2020 | "text/plain": [ |
2021 | | - "DocmentTbl(obj=<function _Test.foo at 0x135ffdbc0>, dm={'c': {'docment': 'description of param c', 'anno': <class 'int'>, 'default': <class 'inspect._empty'>}, 'd': {'docment': 'description of param d', 'anno': <class 'bool'>, 'default': True}, 'return': {'docment': <class 'inspect._empty'>, 'anno': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>}}, verbose=True, returns=True, params=['self', 'c', 'd'])" |
| 2021 | + "DocmentTbl(obj=<function _Test.foo>, dm={'c': {'docment': 'description of param c', 'anno': <class 'int'>, 'default': <class 'inspect._empty'>}, 'd': {'docment': 'description of param d', 'anno': <class 'bool'>, 'default': True}, 'return': {'docment': <class 'inspect._empty'>, 'anno': <class 'inspect._empty'>, 'default': <class 'inspect._empty'>}}, verbose=True, returns=True, params=['self', 'c', 'd'])" |
2022 | 2022 | ] |
2023 | 2023 | }, |
2024 | 2024 | "execution_count": null, |
|
2150 | 2150 | " curr.append(fmt)\n", |
2151 | 2151 | " if doc: lines.append(', '.join(curr) + ',' + comment); curr = []\n", |
2152 | 2152 | " if curr: lines.append(', '.join(curr))\n", |
2153 | | - " sig_str = f\"def {get_name(self.obj)}(\\n {'\\n '.join(lines)}\\n{self._ret_str}\"\n", |
| 2153 | + " params = '\\n '.join(lines)\n", |
| 2154 | + " sig_str = f\"def {get_name(self.obj)}(\\n {params}\\n{self._ret_str}\"\n", |
2154 | 2155 | " docstr = f' \"{self.obj.__doc__}\"' if self.docstring and self.obj.__doc__ else ''\n", |
2155 | 2156 | " return f\"{sig_str}\\n{docstr}\"\n", |
2156 | 2157 | " \n", |
|
0 commit comments