Skip to content

Commit e84bade

Browse files
committed
shorter lines
1 parent 656175f commit e84bade

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

fastcore/docments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def _repr_markdown_(self): return '\n'.join(self._fmt(k,v) for k,v in self.dm.it
315315

316316
# %% ../nbs/04_docments.ipynb
317317
class DocmentText(_DocmentBase):
318-
def __init__(self, obj, maxline=160, docstring=True):
318+
def __init__(self, obj, maxline=110, docstring=True):
319319
super().__init__(obj)
320320
self.maxline,self.docstring = maxline,docstring
321321

@@ -351,7 +351,7 @@ def __str__(self):
351351
def _repr_markdown_(self): return f"```python\n{self}\n```"
352352

353353
# %% ../nbs/04_docments.ipynb
354-
def sig2str(func, maxline=160):
354+
def sig2str(func, maxline=110):
355355
"Generate function signature with docments as comments"
356356
return DocmentText(func, maxline=maxline, docstring=False)
357357

@@ -366,7 +366,7 @@ def _fullname(o):
366366
return name if module is None or module in ('__main__','builtins') else module + '.' + name
367367

368368
class ShowDocRenderer:
369-
def __init__(self, sym, name:str|None=None, title_level:int=3, maxline:int=120):
369+
def __init__(self, sym, name:str|None=None, title_level:int=3, maxline:int=110):
370370
"Show documentation for `sym`"
371371
sym = getattr(sym, '__wrapped__', sym)
372372
sym = getattr(sym, 'fget', None) or getattr(sym, 'fset', None) or sym

nbs/04_docments.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@
20992099
"source": [
21002100
"#| export\n",
21012101
"class DocmentText(_DocmentBase):\n",
2102-
" def __init__(self, obj, maxline=160, docstring=True):\n",
2102+
" def __init__(self, obj, maxline=110, docstring=True):\n",
21032103
" super().__init__(obj)\n",
21042104
" self.maxline,self.docstring = maxline,docstring\n",
21052105
"\n",
@@ -2239,7 +2239,7 @@
22392239
"outputs": [],
22402240
"source": [
22412241
"#| export\n",
2242-
"def sig2str(func, maxline=160):\n",
2242+
"def sig2str(func, maxline=110):\n",
22432243
" \"Generate function signature with docments as comments\"\n",
22442244
" return DocmentText(func, maxline=maxline, docstring=False)"
22452245
]
@@ -2309,7 +2309,7 @@
23092309
" return name if module is None or module in ('__main__','builtins') else module + '.' + name\n",
23102310
"\n",
23112311
"class ShowDocRenderer:\n",
2312-
" def __init__(self, sym, name:str|None=None, title_level:int=3, maxline:int=120):\n",
2312+
" def __init__(self, sym, name:str|None=None, title_level:int=3, maxline:int=110):\n",
23132313
" \"Show documentation for `sym`\"\n",
23142314
" sym = getattr(sym, '__wrapped__', sym)\n",
23152315
" sym = getattr(sym, 'fget', None) or getattr(sym, 'fset', None) or sym\n",

0 commit comments

Comments
 (0)