Mercurial > hg
view mercurial/thirdparty/attr/_config.py @ 36988:317382151ac3
templater: rename .render(mapping) to .renderdefault(mapping) (API)
I'm going to add templ.render(t, mapping) and templ.generate(t, mapping) in
place of stringify(templ(t, **mapping)) and templ(t, **mapping) respectively.
.. api::
The ``render(mapping)`` method of the templater has been renamed to
``renderdefault(mapping)``.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 17 Mar 2018 11:23:04 +0900 |
parents | 765eb17a7eb8 |
children | e1c586b9a43c |
line wrap: on
line source
from __future__ import absolute_import, division, print_function __all__ = ["set_run_validators", "get_run_validators"] _run_validators = True def set_run_validators(run): """ Set whether or not validators are run. By default, they are run. """ if not isinstance(run, bool): raise TypeError("'run' must be bool.") global _run_validators _run_validators = run def get_run_validators(): """ Return whether or not validators are run. """ return _run_validators