|
1697 | 1697 | "#| export\n", |
1698 | 1698 | "def _maybe_nm(o):\n", |
1699 | 1699 | " if (o == inspect._empty): return ''\n", |
1700 | | - " else: return o.__name__ if hasattr(o, '__name__') else _escape_markdown(str(o))" |
| 1700 | + " else: return o.__name__ if hasattr(o, '__name__') else str(o)" |
1701 | 1701 | ] |
1702 | 1702 | }, |
1703 | 1703 | { |
|
1842 | 1842 | "| **Returns** | **int** | | |" |
1843 | 1843 | ], |
1844 | 1844 | "text/plain": [ |
1845 | | - "DocmentTbl(obj=<function _f at 0x1361a9300>, 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'])" |
| 1845 | + "DocmentTbl(obj=<function _f at 0x134bf1440>, 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'])" |
1846 | 1846 | ] |
1847 | 1847 | }, |
1848 | 1848 | "execution_count": null, |
|
1920 | 1920 | "| **Returns** | **str** | | **Result of doing it** |" |
1921 | 1921 | ], |
1922 | 1922 | "text/plain": [ |
1923 | | - "DocmentTbl(obj=<function _f at 0x1361a91c0>, 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'])" |
| 1923 | + "DocmentTbl(obj=<function _f at 0x134b9b600>, 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'])" |
1924 | 1924 | ] |
1925 | 1925 | }, |
1926 | 1926 | "execution_count": null, |
|
2013 | 2013 | "| d | bool | True | description of param d |" |
2014 | 2014 | ], |
2015 | 2015 | "text/plain": [ |
2016 | | - "DocmentTbl(obj=<function _Test.foo at 0x1361a9120>, 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'])" |
| 2016 | + "DocmentTbl(obj=<function _Test.foo at 0x134b9a840>, 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'])" |
2017 | 2017 | ] |
2018 | 2018 | }, |
2019 | 2019 | "execution_count": null, |
|
2456 | 2456 | "\n", |
2457 | 2457 | "@delegates(f)\n", |
2458 | 2458 | "def g(\n", |
2459 | | - " b:int, # bb\n", |
| 2459 | + " b:int|str, # bb\n", |
2460 | 2460 | " **kwargs\n", |
2461 | 2461 | "): return kwargs" |
2462 | 2462 | ] |
|
2473 | 2473 | "```python\n", |
2474 | 2474 | "\n", |
2475 | 2475 | "def g(\n", |
2476 | | - " b:int, # bb\n", |
| 2476 | + " b:int | str, # bb\n", |
2477 | 2477 | " a:int=0, # aa\n", |
2478 | 2478 | "):\n", |
2479 | 2479 | "\n", |
|
2484 | 2484 | "```python\n", |
2485 | 2485 | "\n", |
2486 | 2486 | "def g(\n", |
2487 | | - " b:int, # bb\n", |
| 2487 | + " b:int | str, # bb\n", |
2488 | 2488 | " a:int=0, # aa\n", |
2489 | 2489 | "):\n", |
2490 | 2490 | "\n", |
|
0 commit comments