Skip to content

Commit d688c87

Browse files
committed
refactor: Use new mkdocstrings_handlers namespace
1 parent 171faf1 commit d688c87

39 files changed

+19
-11
lines changed

docs/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Option | Type | Description | Default
7373

7474
### Rendering
7575

76-
::: mkdocstrings.handlers.python:PythonRenderer.default_config
76+
::: mkdocstrings_handlers.python.renderer:PythonRenderer.default_config
7777
rendering:
7878
show_root_toc_entry: false
7979

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Funding = "https://github.com/sponsors/pawamoy"
4646

4747
[tool.pdm]
4848
version = {use_scm = true}
49-
includes = ["src/mkdocstrings"]
49+
includes = ["src/mkdocstrings_handlers"]
50+
editable-backend = "editables"
5051

5152
[tool.pdm.dev-dependencies]
5253
duty = ["duty>=0.7"]
File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""This package implements a handler for the Python language."""
2+
3+
from mkdocstrings_handlers.python.handler import get_handler
4+
5+
__all__ = ["get_handler"] # noqa: WPS410

src/mkdocstrings/handlers/python/collector.py renamed to src/mkdocstrings_handlers/python/collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def collect(self, identifier: str, config: dict) -> CollectorItem:
120120
121121
Then we pick up the only object within the `objects` list (there's always only one, because we collect
122122
them one by one), rebuild it's categories lists
123-
(see [`rebuild_category_lists()`][mkdocstrings.handlers.python.collector.rebuild_category_lists]),
123+
(see [`rebuild_category_lists()`][mkdocstrings_handlers.python.collector.rebuild_category_lists]),
124124
and return it.
125125
126126
Arguments:

src/mkdocstrings/handlers/python/__init__.py renamed to src/mkdocstrings_handlers/python/handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
from typing import Any, BinaryIO, Iterator, List, Optional, Tuple
55

66
from mkdocstrings.handlers.base import BaseHandler
7-
from mkdocstrings.handlers.python.collector import PythonCollector
8-
from mkdocstrings.handlers.python.renderer import PythonRenderer
97
from mkdocstrings.inventory import Inventory
108
from mkdocstrings.loggers import get_logger
9+
from mkdocstrings_handlers.python.collector import PythonCollector
10+
from mkdocstrings_handlers.python.renderer import PythonRenderer
1111

1212
# TODO: add a deprecation warning once the new handler handles 95% of use-cases
1313

src/mkdocstrings/handlers/python/renderer.py renamed to src/mkdocstrings_handlers/python/renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class PythonRenderer(BaseRenderer):
2323
Attributes:
2424
fallback_theme: The theme to fallback to.
2525
default_config: The default rendering options,
26-
see [`default_config`][mkdocstrings.handlers.python.PythonRenderer.default_config].
26+
see [`default_config`][mkdocstrings_handlers.python.renderer.PythonRenderer.default_config].
2727
"""
2828

2929
fallback_theme = "material"

0 commit comments

Comments
 (0)