Skip to content

Commit

Permalink
docs: update add_filter doc comment, closes #126
Browse files Browse the repository at this point in the history
  • Loading branch information
jg-rp committed Aug 13, 2023
1 parent 8f3ba5a commit e631f09
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions liquid/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,8 @@ def add_filter(self, name: str, func: Callable[..., Any]) -> None:
template.
func: Any callable that accepts at least one argument, the result of the
expression the filter is applied to. If the filter needs access to the
environment or render context, you probably want to make `func` a class
that inherits from `liquid.filter.Filter`, and override the
`__call__` method. All builtin filters are implemented in this way.
active environment or render context, use `liquid.filer.with_context`
and/or `liquid.filter.with_environment` decorators.
"""
self.filters[name] = func

Expand Down

0 comments on commit e631f09

Please sign in to comment.