Skip to content

Commit 001c5d7

Browse files
committed
docs: Document how lazy members are supported (__dir__)
1 parent 1f0fa78 commit 001c5d7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎docs/usage/configuration/general.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ Whether to force inspecting modules (importing them) even if their source code i
247247

248248
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/).
249249

250+
To document lazy module members, set `force_inspection: true` and ensure the module exposes their names through `__dir__` and their values through `__getattr__`. See [Lazy module members](https://mkdocstrings.github.io/griffe/guide/users/loading/#lazy-module-members) for an example.
251+
250252
See also [`allow_inspection`](#allow_inspection).
251253

252254
```yaml title="in mkdocs.yml (global configuration)"

0 commit comments

Comments
 (0)