Skip to content

Commit

Permalink
Added warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotwrobson committed Nov 19, 2024
1 parent 66c8f72 commit 2cb492b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/lint-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
run: poetry install --with dev

- name: Run ruff
run: poetry run ruff check .
run:
poetry run ruff check .
poetry run ruff format --check .

- name: Run mypy
run: poetry run mypy .
6 changes: 6 additions & 0 deletions src/mystace/mustache_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import enum
import typing as t
import warnings
from collections import deque

import typing_extensions as te
Expand Down Expand Up @@ -490,4 +491,9 @@ def render_from_template(
data: ContextObjT = None,
partials: t.Optional[t.Dict[str, str]] = None,
) -> str:
if partials is not None:
warnings.warn(
"Use of partials is experimental and not fully up to spec. Use at your own risk!!"
)

return MustacheRenderer.from_template(template, partials).render(data)

0 comments on commit 2cb492b

Please sign in to comment.