Fix template_filter to support usage without parentheses; fix typing error
This commit is contained in:
parent
c5d00407b3
commit
cec6f73b88
2 changed files with 4 additions and 6 deletions
|
|
@ -2,9 +2,7 @@ version: 2
|
|||
build:
|
||||
os: ubuntu-24.04
|
||||
tools:
|
||||
python: '3.13'
|
||||
python: '3.11' # safer stable version
|
||||
commands:
|
||||
- asdf plugin add uv
|
||||
- asdf install uv latest
|
||||
- asdf global uv latest
|
||||
- uv run --group docs sphinx-build -W -b dirhtml docs $READTHEDOCS_OUTPUT/html
|
||||
- pip install -r requirements.txt # if you have a requirements file for docs
|
||||
- sphinx-build -b dirhtml docs $READTHEDOCS_OUTPUT/html
|
||||
|
|
|
|||
|
|
@ -680,7 +680,7 @@ class App(Scaffold):
|
|||
"""
|
||||
|
||||
if callable(name):
|
||||
func = name
|
||||
func = t.cast(t.Callable[..., t.Any], name)
|
||||
name = func.__name__
|
||||
self.add_template_filter(func, name=name)
|
||||
return func # ✅ return original function (not a wrapper)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue