@@ -380,3 +380,107 @@ poetry install
380380poetry run mkdocs build
381381` ` `
382382///
383+
384+ # # Recommended settings
385+
386+ If you're in a hurry, here is the configuration we recommend for the Python handler.
387+
388+ ` ` ` yaml
389+ - mkdocstrings:
390+ handlers:
391+ python:
392+
393+ # Where to find your sources, see "Finding modules".
394+ paths: [src]
395+
396+ # Load object inventories to enable cross-references to other projects.
397+ inventories:
398+ - https://docs.python.org/3/objects.inv
399+ # Also load inventories of your dependencies, generally served at
400+ # https://docs-url-for-your-dependency/objects.inv.
401+
402+ options:
403+
404+ # DOCSTRINGS -------------------------------------------------------------
405+ docstring_options:
406+ # Discard first line of ` __init__` method docstrings,
407+ # useful when merging such docstrings into their parent class'.
408+ ignore_init_summary : true
409+
410+ # Tables are generally too large, lists will fix this.
411+ docstring_section_style : list
412+
413+ # CROSS-REFERENCES -------------------------------------------------------
414+ # Enable relative crossrefs and scoped crossrefs, see Docstrings options.
415+ relative_crossrefs : true # Sponsors only!
416+ scoped_crossrefs : true # Sponsors only!
417+
418+ # Enable cross-references in signatures.
419+ signature_crossrefs : true
420+
421+ # Unwrap actual types from `Annotated` type annotations.
422+ unwrap_annotated : true
423+
424+ # MEMBERS ----------------------------------------------------------------
425+ # Only render pulic symbols.
426+ filters : public # Sponsors only!
427+ # Comment the option otherwise to get the default filters.
428+
429+ # Show class inherited members.
430+ inherited_members : true
431+
432+ # Render auto-generated summaries of attributes, functions, etc.
433+ # at the start of each symbol's documentation.
434+ summary : true
435+
436+ # HEADINGS ---------------------------------------------------------------
437+ # For auto-generated pages, one module per page,
438+ # make the module heading be the H1 heading of the page.
439+ heading_level : 1
440+
441+ # Render headings for parameters, making them linkable.
442+ parameter_headings : true
443+
444+ # Render headings for type parameters too.
445+ type_parameter_headings : true
446+
447+ # Always show the heading for the symbol you render with `::: id`.
448+ show_root_heading : true
449+
450+ # Only show the name of the symbols you inject render `::: id`.
451+ show_root_full_path : false
452+
453+ # Show the type of symbol (class, function, etc.) in the heading.
454+ show_symbol_type_heading : true
455+
456+ # Show the type of symbol (class, function, etc.) in the table of contents.
457+ show_symbol_type_toc : true
458+
459+ # SIGNATURES -------------------------------------------------------------
460+ # Format code to 80 + 10% margin (Black and Ruff defaults)
461+ # in signatures and attribute value code blocks.
462+ # Needs Black/Ruff installed.
463+ line_length : 88
464+
465+ # Merge signature and docstring of `__init__` methods
466+ # into their parent class signature and docstring.
467+ merge_init_into_class : true
468+
469+ # Render signatures and attribute values in a separate code block,
470+ # below the symbol heading.
471+ separate_signature : true
472+
473+ # Show type annotations in signatures.
474+ show_signature_annotations : true
475+
476+ # Show type parameters in signatures.
477+ show_signature_type_parameters : true
478+
479+ # OTHER ------------------------------------------------------------------
480+ # Show backlinks to other documentation sections within each symbol.
481+ backlinks : tree # Sponsors only!
482+
483+ # Show base classes OR inheritance diagram.
484+ show_bases : false
485+ show_inheritance_diagram : true # Sponsors only!
486+ ` ` `
0 commit comments