File tree 2 files changed +6
-3
lines changed
src/mkdocstrings_handlers/python 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -141,8 +141,11 @@ More details at [Finding modules](#finding-modules).
141
141
This option allows resolving aliases (imports) to any external module.
142
142
Modules are considered external when they are not part
143
143
of the package your are injecting documentation for.
144
- Enabling this option will tell the handler to resolve aliases recursively
144
+ Setting this option to `True` will tell the handler to resolve aliases recursively
145
145
when they are made public through the [`__all__`][__all__] variable.
146
+ By default, the handler will only resolve aliases when they point at a private sibling
147
+ of the source package, for example aliases going from `ast` to `_ast`.
148
+ Set `load_external_modules` to `False` to prevent even that.
146
149
147
150
WARNING : **Use with caution**
148
151
This can load a *lot* of modules through [Griffe],
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ def __init__(
197
197
config_file_path : str | None = None ,
198
198
paths : list [str ] | None = None ,
199
199
locale : str = "en" ,
200
- load_external_modules : bool = False ,
200
+ load_external_modules : bool | None = None ,
201
201
** kwargs : Any ,
202
202
) -> None :
203
203
"""Initialize the handler.
@@ -474,7 +474,7 @@ def get_handler(
474
474
config_file_path : str | None = None ,
475
475
paths : list [str ] | None = None ,
476
476
locale : str = "en" ,
477
- load_external_modules : bool = False ,
477
+ load_external_modules : bool | None = None ,
478
478
** config : Any , # noqa: ARG001
479
479
) -> PythonHandler :
480
480
"""Simply return an instance of `PythonHandler`.
You can’t perform that action at this time.
0 commit comments