jinja2: Add Template.environment (#1789)

From the docstring for Template: "Template objects created from the
constructor rather than an environment do have an `environment`
attribute that points to a temporary environment ..."
This commit is contained in:
Sebastian Rittau
2017-12-17 19:04:53 +01:00
committed by Jelle Zijlstra
parent 4b6b484786
commit 64ca731d0b

View File

@@ -79,6 +79,7 @@ class Environment:
class Template:
def __new__(cls, source, block_start_string: Any = ..., block_end_string: Any = ..., variable_start_string: Any = ..., variable_end_string: Any = ..., comment_start_string: Any = ..., comment_end_string: Any = ..., line_statement_prefix: Any = ..., line_comment_prefix: Any = ..., trim_blocks: Any = ..., lstrip_blocks: Any = ..., newline_sequence: Any = ..., keep_trailing_newline: Any = ..., extensions: Any = ..., optimized: bool = ..., undefined: Any = ..., finalize: Optional[Any] = ..., autoescape: bool = ...): ...
environment: Environment = ...
@classmethod
def from_code(cls, environment, code, globals, uptodate: Optional[Any] = ...): ...
@classmethod