Skip to content

Commit bbab96a

Browse files
committed
fixup! feat: allow force_inspection option to be configurable
1 parent 6796486 commit bbab96a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/usage/configuration/general.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,30 @@ plugins:
5555
////
5656
///
5757
58+
## `force_inspection`
59+
60+
- **:octicons-package-24: Type [`bool`][] :material-equal: `False`{ title="default value" }**
61+
<!-- - **:octicons-project-template-24: Template :material-null:** (contained in [`class.html`][class template]) -->
62+
63+
Whether to force inspecting modules (importing them) even if their source code is available.
64+
65+
This option is useful when you know that dynamic analysis (inspection) yields better results than static analysis. Do not use this blindly: the recommended approach is to write a Griffe extension that will improve extracted API data. See [How to selectively inspect objects](https://mkdocstrings.github.io/griffe/guide/users/how-to/selectively-inspect/).
66+
67+
```yaml title="in mkdocs.yml (global configuration)"
68+
plugins:
69+
- mkdocstrings:
70+
handlers:
71+
python:
72+
options:
73+
force_inspection: false
74+
```
75+
76+
```md title="or in docs/some_page.md (local configuration)"
77+
::: path.to.object
78+
options:
79+
force_inspection: true
80+
```
81+
5882
## `show_bases`
5983

6084
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**

0 commit comments

Comments
 (0)