Skip to content

Commit afef6a8

Browse files
committed
Update the arguments of get_handler.
1 parent eaf320c commit afef6a8

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

mkdocstrings_handlers/vba/handler.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,26 @@ def load_inventory(
5454

5555
def get_handler(
5656
theme: str,
57-
custom_templates: Optional[str] = None,
57+
custom_templates: str | None = None,
58+
config_file_path: str | None = None,
59+
paths: list[str] | None = None,
60+
locale: str = "en",
5861
**config: Any,
5962
) -> VbaHandler:
6063
"""Simply return an instance of `VbaHandler`.
6164
6265
Arguments:
6366
theme: The theme to use when rendering contents.
6467
custom_templates: Directory containing custom templates.
68+
config_file_path: The MkDocs configuration file path.
69+
paths: A list of paths to use as Griffe search paths.
70+
locale: The locale to use when rendering content.
6571
**config: Configuration passed to the handler.
6672
6773
Returns:
6874
An instance of `VbaHandler`.
6975
"""
7076
return VbaHandler(
71-
# TODO How do we get the path of the directory containing mkdocs.yml here?
72-
# Identifiers for .bas files need to be found relative to that.
73-
# See question asked at https://github.com/mkdocstrings/mkdocstrings/issues/387#issuecomment-1048869214
74-
collector=VbaCollector(base_dir=Path(".")),
77+
collector=VbaCollector(base_dir=Path(config_file_path).parent),
7578
renderer=VbaRenderer("vba", theme, custom_templates),
7679
)

0 commit comments

Comments
 (0)