An open API service indexing awesome lists of open source software.

https://github.com/mkdocstrings/griffe-autodocstringstyle

Set docstring style to 'auto' for external packages. Available to sponsors only.
https://github.com/mkdocstrings/griffe-autodocstringstyle

docstring-style docstrings google-style griffe griffe-extension numpydoc

Last synced: 27 days ago
JSON representation

Set docstring style to 'auto' for external packages. Available to sponsors only.

Awesome Lists containing this project

README

          

# griffe-autodocstringstyle

[![ci](https://github.com/mkdocstrings/griffe-autodocstringstyle/workflows/ci/badge.svg)](https://github.com/mkdocstrings/griffe-autodocstringstyle/actions?query=workflow%3Aci)
[![documentation](https://img.shields.io/badge/docs-zensical-FF9100.svg?style=flat)](https://mkdocstrings.github.io/griffe-autodocstringstyle/)
[![pypi version](https://img.shields.io/pypi/v/griffe-autodocstringstyle.svg)](https://pypi.org/project/griffe-autodocstringstyle/)
[![gitter](https://img.shields.io/badge/matrix-chat-4DB798.svg?style=flat)](https://app.gitter.im/#/room/#griffe-autodocstringstyle:gitter.im)

Set docstring style to 'auto' for external packages.

## Installation

```bash
pip install griffe-autodocstringstyle
```

## Usage

[Enable](https://mkdocstrings.github.io/griffe/guide/users/extending/#using-extensions) the `griffe_autodocstringstyle` extension. Now all packages loaded from a virtual environment will have their docstrings parsed with the `auto` style (automatically guessing the docstring style).

Use the `exclude` option to pass package names that shouldn't be considered. This can be useful if you must first install your sources as a package before loading/documenting them (meaning they end up in the virtual environment too).

With MkDocs:

```yaml
plugins:
- mkdocstrings:
handlers:
python:
options:
extensions:
- griffe_autodocstringstyle:
# only useful if your sources can't be found
# in the current working directory
exclude:
- my_package
```

## Sponsors


Silver sponsors


FastAPI



Bronze sponsors


Nixtla



---


ofek
samuelcolvin
tlambert03
ssbarnea
femtomc
cmarqu
kolenaIO
ramnes
machow
BenHammersley
trevorWieland
MarcoGorelli
analog-cbarber
OdinManiac
rstudio-sponsorship
schlich
butterlyn
livingbio
NemetschekAllplan
EricJayHartman
15r10nk
activeloopai
roboflow
cmclaughlin
blaisep
RapidataAI
rodolphebarbanneau
theSymbolSyndicate
blakeNaccarato
ChargeStorm
Alphadelta14
Cusp-AI

*And 7 more private sponsor(s).*