summaryrefslogtreecommitdiff
path: root/src/jinja2/compiler.py
Commit message (Collapse)AuthorAgeFilesLines
* async support doesn't require patchinginline-asyncDavid Lord2021-04-101-8/+7
|
* unify/rename filter and function decoratorsDavid Lord2021-04-101-21/+26
| | | | Use pass_context instead of contextfilter and contextfunction, etc.
* extract common code for import/from nodesDavid Lord2021-04-101-20/+13
|
* refactor compiler environment.is_async checksangelafrentz2021-04-091-25/+21
|
* add 'is filter' and 'is test' testsDavid Lord2021-04-041-29/+66
| | | | | | This required allowing tests to be decorated with '@environmentfilter'. Tests are essentially the same as filters now, the node, compiler, and environment have been refactored to extract common behavior.
* allow optional use of filter based on existenceAmy2021-04-041-2/+26
|
* track local loop/block vars for contextfunctionsAmy2021-03-261-4/+37
|
* allow scoped blocks to access loop varsAmy2021-03-261-3/+6
|
* consistent typing configDavid Lord2021-02-241-1/+2
|
* add required attribute to blocksAmy2021-01-291-0/+9
| | | | | required blocks must be overridden at some point, although not necessarily by the direct child template
* Setup mypyTeymour Aldridge2020-07-281-12/+12
| | | | | * Add missing type hints (these are intended as an initial set of type hints, to be added upon and improved later) * Setup MyPy to run as a Github Action
* imported templates can see the current globalsAmy2020-06-221-2/+2
| | | | | | | _get_default_module takes an optional context to indicate that the template is imported. If there are differences between the environment and rendered template globals, a new module is used for the imported template.
* apply pyupgrade and f-stringsDavid Lord2020-02-051-190/+146
|
* remove more compat codeDavid Lord2020-02-051-0/+1
|
* remove _compat moduleDavid Lord2020-02-051-78/+32
|
* Use stricter getattr() checks for decorator functionsTomas Krizek2020-02-041-6/+6
| | | | | | | Explicit checks for "is True" prevents unexpected behaviour with objects that are callable and have permissive gettatr(), such as Mock. Fixes #1145
* Fix attribute access in async code. Fixes #1141Armin Ronacher2020-01-301-4/+4
|
* import Markup from markupsafe, fix flake8 import warningsDavid Lord2020-01-261-3/+4
|
* Revert "rename directory to jinja"revert-renameDavid Lord2020-01-261-0/+1842
| | | | This reverts commit eac9acb7aeabf6f3e0ed4cb876e200e5e72d0d0e.
* rename directory to jinjaDavid Lord2020-01-101-1842/+0
|
* simplify module docstringsstyleDavid Lord2020-01-101-9/+1
|
* more relative importsDavid Lord2020-01-101-1/+1
| | | | | _identifier exports a compiled regex instead of a string to avoid some tricky cleanup
* apply flake8David Lord2020-01-101-7/+6
|
* apply blackDavid Lord2020-01-101-415/+484
|
* apply reorder-python-importsDavid Lord2020-01-101-11/+21
|
* move to src directoryDavid Lord2020-01-091-0/+1772