Skip to content

Commit

Permalink
build: add yamling dep
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Nov 4, 2024
1 parent a6720b1 commit 678f803
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mkdocs_mknodes/builders/configbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import os
from typing import Any

from jinjarope import yamltools
from mkdocs.config import load_config
from mkdocs.config.defaults import MkDocsConfig
from mknodes.info import mkdocsconfigfile
import yamling

from mkdocs_mknodes import telemetry

Expand Down Expand Up @@ -47,7 +47,7 @@ def build_mkdocs_config(
if self.clone_depth is not None:
plugin["mknodes"]["clone_depth"] = self.clone_depth
# cfg = {**cfg, **kwargs}
text = yamltools.dump_yaml(dict(cfg))
text = yamling.dump_yaml(dict(cfg))
buffer = io.StringIO(text)
buffer.name = cfg.path
config = load_config(buffer, **kwargs)
Expand Down
4 changes: 2 additions & 2 deletions mkdocs_mknodes/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import typer as t

from jinjarope import yamltools
from mknodes.utils import classhelpers, log
import mknodes as mk
import yamling

from mkdocs_mknodes import buildcollector, paths
from mkdocs_mknodes.cli import richstate
Expand Down Expand Up @@ -171,7 +171,7 @@ def create_config(
config["site_name"] = info.distribution_name
config["site_author"] = info.author_name
config["copyright"] = f"Copyright © {datetime.now().year} {info.author_name}"
result = yamltools.dump_yaml(config)
result = yamling.dump_yaml(config)
print(result)


Expand Down
4 changes: 2 additions & 2 deletions mkdocs_mknodes/commands/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
from urllib.parse import urlsplit

# from mkdocs.commands import serve as serve_
from jinjarope import yamltools
from mkdocs.config import load_config
from mknodes.info import mkdocsconfigfile
from mknodes.utils import log
import yamling

from mkdocs_mknodes import liveserver, paths
from mkdocs_mknodes.commands import build_page
Expand Down Expand Up @@ -53,7 +53,7 @@ def serve(
config.remove_plugin("social")
config.remove_plugin("tags")
kwargs["theme"] = theme
text = yamltools.dump_yaml(dict(config))
text = yamling.dump_yaml(dict(config))
stream = io.StringIO(text)
stream.name = str(config_path)
_serve(config_file=stream, livereload=False, **kwargs) # type: ignore[arg-type]
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ dependencies = [
"typer",
# Tools
"jinja2",
"jinjarope[yaml]",
"jinjarope",
"yamling",
"universal_pathlib",
"pydantic",
"logfire[requests,aiohttp,system-metrics]",
Expand Down

0 comments on commit 678f803

Please sign in to comment.