File tree Expand file tree Collapse file tree 3 files changed +33
-7
lines changed Expand file tree Collapse file tree 3 files changed +33
-7
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,8 @@ plugins:
125125 type : quote
126126
127127` ` ` python linenums="1"
128- def some_function(): ...
128+ def some_function():
129+ ...
129130` ` `
130131/////
131132////
Original file line number Diff line number Diff line change @@ -47,14 +47,18 @@ plugins:
4747` ` ` python title="package/module.py"
4848" " " Module docstring." " "
4949
50+
5051def this_function() :
5152 " " " Function docstring." " "
5253
54+
5355class ThisClass :
5456 " " " Class docstring." " "
57+
5558 def method(self) :
5659 " " " Method docstring." " "
5760
61+
5862this_attribute = 0
5963" " " Attribute docstring." " "
6064```
@@ -207,6 +211,7 @@ plugins:
207211` ` ` python title="package/module.py"
208212"""Module docstring."""
209213
214+
210215class Base:
211216 """Base class."""
212217
@@ -283,12 +288,15 @@ plugins:
283288` ` ` python title="package/module.py"
284289"""Module docstring."""
285290
291+
286292def function_b():
287293 """Function a."""
288294
295+
289296def function_a():
290297 """Function b."""
291298
299+
292300def function_c():
293301 """Function c."""
294302` ` `
@@ -373,8 +381,12 @@ plugins:
373381` ` `
374382
375383` ` ` python title="package/module.py"
376- def hello(): ...
377- def _world(): ...
384+ def hello():
385+ ...
386+
387+
388+ def _world():
389+ ...
378390` ` `
379391
380392/// admonition | Preview
@@ -437,10 +449,19 @@ plugins:
437449` ` `
438450
439451` ` ` python title="package/module.py"
440- def function_a(): ...
441- class ClassB: ...
452+ def function_a():
453+ ...
454+
455+
456+ class ClassB:
457+ ...
458+
459+
442460attribute_C = 0
443- def function_d(): ...
461+
462+
463+ def function_d():
464+ ...
444465` ` `
445466
446467/// admonition | Preview
Original file line number Diff line number Diff line change @@ -63,7 +63,11 @@ from pathlib import Path
6363basedir = " src/mkdocstrings_handlers/python/templates/material"
6464print (" theme/" )
6565for filepath in sorted (path for path in Path(basedir).rglob(" *" ) if " _base" not in str (path) and path.suffix != " .css" ):
66- print (" " * (len (filepath.relative_to(basedir).parent.parts) + 1 ) + filepath.name + (" /" if filepath.is_dir() else " " ))
66+ print (
67+ " " * (len (filepath.relative_to(basedir).parent.parts) + 1 )
68+ + filepath.name
69+ + (" /" if filepath.is_dir() else " " )
70+ )
6771```
6872
6973See them [ in the repository] ( https://github.com/mkdocstrings/python/tree/master/src/mkdocstrings_handlers/python/templates/ ) .
You can’t perform that action at this time.
0 commit comments