Skip to content

Commit

Permalink
Update the arguments of get_handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfbyker committed Aug 22, 2023
1 parent eaf320c commit afef6a8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions mkdocstrings_handlers/vba/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,26 @@ def load_inventory(

def get_handler(
theme: str,
custom_templates: Optional[str] = None,
custom_templates: str | None = None,
config_file_path: str | None = None,
paths: list[str] | None = None,
locale: str = "en",
**config: Any,
) -> VbaHandler:
"""Simply return an instance of `VbaHandler`.
Arguments:
theme: The theme to use when rendering contents.
custom_templates: Directory containing custom templates.
config_file_path: The MkDocs configuration file path.
paths: A list of paths to use as Griffe search paths.
locale: The locale to use when rendering content.
**config: Configuration passed to the handler.
Returns:
An instance of `VbaHandler`.
"""
return VbaHandler(
# TODO How do we get the path of the directory containing mkdocs.yml here?
# Identifiers for .bas files need to be found relative to that.
# See question asked at https://github.com/mkdocstrings/mkdocstrings/issues/387#issuecomment-1048869214
collector=VbaCollector(base_dir=Path(".")),
collector=VbaCollector(base_dir=Path(config_file_path).parent),
renderer=VbaRenderer("vba", theme, custom_templates),
)

0 comments on commit afef6a8

Please sign in to comment.