File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/mkdocstrings_handlers/python Expand file tree Collapse file tree 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).
141141This option allows resolving aliases (imports) to any external module.
142142Modules are considered external when they are not part
143143of 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
145145when 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.
146149
147150WARNING: **Use with caution**
148151This can load a *lot* of modules through [Griffe],
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ def __init__(
197197 config_file_path: str | None = None,
198198 paths: list[str] | None = None,
199199 locale: str = "en",
200- load_external_modules: bool = False ,
200+ load_external_modules: bool | None = None ,
201201 **kwargs: Any,
202202 ) -> None:
203203 """Initialize the handler.
@@ -474,7 +474,7 @@ def get_handler(
474474 config_file_path: str | None = None,
475475 paths: list[str] | None = None,
476476 locale: str = "en",
477- load_external_modules: bool = False ,
477+ load_external_modules: bool | None = None ,
478478 **config: Any, # noqa: ARG001
479479) -> PythonHandler:
480480 """Simply return an instance of `PythonHandler`.
You can’t perform that action at this time.
0 commit comments