Skip to content

Commit

Permalink
Merge pull request #94 from yujunz/custom-filters
Browse files Browse the repository at this point in the history
Add parameter description for custom filters
  • Loading branch information
ssato committed Jun 22, 2018
2 parents 8635756 + 6cc6b94 commit 264d01e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions anyconfig/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def render_s(tmpl_s, ctx=None, paths=None, filters=None):
:param tmpl_s: Template string
:param ctx: Context dict needed to instantiate templates
:param paths: Template search paths
:param filters: Custom filters to add into template engine
:return: Compiled result (str)
>>> render_s("aaa") == "aaa"
Expand Down Expand Up @@ -125,6 +126,7 @@ def render_impl(template_file, ctx=None, paths=None, filters=None):
"""
:param template_file: Absolute or relative path to the template file
:param ctx: Context dict needed to instantiate templates
:param filters: Custom filters to add into template engine
:return: Compiled result (str)
"""
env = tmpl_env(make_template_paths(template_file, paths))
Expand All @@ -149,6 +151,7 @@ def render(filepath, ctx=None, paths=None, ask=False, filters=None):
:param ctx: Context dict needed to instantiate templates
:param paths: Template search paths
:param ask: Ask user for missing template location if True
:param filters: Custom filters to add into template engine
:return: Compiled result (str)
"""
try:
Expand Down

0 comments on commit 264d01e

Please sign in to comment.