Skip to content

Commit

Permalink
refactor: Use the new mkdocstrings_handlers namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 1, 2022
1 parent e892f56 commit 23c9023
Show file tree
Hide file tree
Showing 59 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ plugins:
import:
- https://mkdocstrings.github.io/objects.inv
watch:
- src/mkdocstrings
- src/mkdocstrings_handlers

extra:
social:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Funding = "https://github.com/sponsors/mkdocstrings"

[tool.pdm]
version = {use_scm = true}
includes = ["src/mkdocstrings"]
includes = ["src/mkdocstrings_handlers"]

[tool.pdm.dev-dependencies]
duty = ["duty>=0.7"]
Expand Down
1 change: 0 additions & 1 deletion scripts/fixsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ for python_version in ${PYTHON_VERSIONS}; do
rm -rf "__pypackages__/${python_version}/lib/mkdocstrings"
rm -f "__pypackages__/${python_version}/lib/mkdocstrings.pth"
cp -r ../mkdocstrings/src/mkdocstrings "__pypackages__/${python_version}/lib/"
cp -r src/mkdocstrings/* "__pypackages__/${python_version}/lib/mkdocstrings"
done
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from griffe.logger import patch_loggers

from mkdocstrings.handlers.base import BaseHandler
from mkdocstrings.handlers.python.collector import PythonCollector
from mkdocstrings.handlers.python.renderer import PythonRenderer
from mkdocstrings.inventory import Inventory
from mkdocstrings.loggers import get_logger
from mkdocstrings_handlers.python.collector import PythonCollector
from mkdocstrings_handlers.python.renderer import PythonRenderer

patch_loggers(get_logger)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class PythonRenderer(BaseRenderer):
Attributes:
fallback_theme: The theme to fallback to.
default_config: The default rendering options,
see [`default_config`][mkdocstrings.handlers.python.PythonRenderer.default_config].
see [`default_config`][mkdocstrings_handlers.python.PythonRenderer.default_config].
"""

fallback_theme = "material"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ log.debug() }}
<details class="{{ section.value.kind }}">
<summary>{{ section.title|convert_markdown(heading_level, html_id)|strip_p }}</summary>
{{ section.value.contents|convert_markdown(heading_level, html_id) }}
</details>
2 changes: 1 addition & 1 deletion tests/test_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from mkdocstrings.handlers.python.collector import CollectionError, PythonCollector
from mkdocstrings_handlers.python.collector import CollectionError, PythonCollector


def test_collect_missing_module():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"mkdocstrings.loggers",
"mkdocstrings.plugin",
"mkdocstrings.handlers.base",
"mkdocstrings.handlers.python",
"mkdocstrings.handlers.rendering",
"mkdocstrings_handlers.python",
],
)
@pytest.mark.skipif(sys.version_info < (3, 7), reason="material is not installed on Python 3.6")
Expand Down

0 comments on commit 23c9023

Please sign in to comment.