Skip to content
Myr

Fixed some string literal warnings. Fixes #646

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent b8bd94a · Browse files · 4 files+12 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+12 added−6 removed

  • other:+12 added−6 removed

4 files+12 added−6 removed

modified:jinja2/lexer.py+4 added-4 removed
286 unmodified lines
287288289@implements_iterator290class TokenStream(object):291 """A token stream is an iterable that yields :class:`Token`\s. The291 """A token stream is an iterable that yields :class:`Token`\\s. The292 parser however does not iterate over it but calls :meth:`next` to go293 one token ahead. The current active token is stored as :attr:`current`.294 """295
203 unmodified lines
499 (c('(.)'), (Failure('Missing end of comment tag'),), None)500 ],501 # blocks502 TOKEN_BLOCK_BEGIN: [503 (c('(?:\-%s\s*|%s)%s' % (503 (c(r'(?:\-%s\s*|%s)%s' % (504 e(environment.block_end_string),505 e(environment.block_end_string),506 block_suffix_re507 )), TOKEN_BLOCK_END, '#pop'),508 ] + tag_rules,509 # variables510 TOKEN_VARIABLE_BEGIN: [511 (c('\-%s\s*|%s' % (511 (c(r'\-%s\s*|%s' % (512 e(environment.variable_end_string),513 e(environment.variable_end_string)514 )), TOKEN_VARIABLE_END, '#pop')515 ] + tag_rules,516 # raw block517 TOKEN_RAW_BEGIN: [518 (c('(.*?)((?:\s*%s\-|%s)\s*endraw\s*(?:\-%s\s*|%s%s))' % (518 (c(r'(.*?)((?:\s*%s\-|%s)\s*endraw\s*(?:\-%s\s*|%s%s))' % (519 e(environment.block_start_string),520 block_prefix_re,521 e(environment.block_end_string),522 e(environment.block_end_string),
203 unmodified lines
modified:jinja2/nodes.py+1 added-1 removed
719 unmodified lines
720721722class Compare(Expr):723 """Compares an expression with some other expressions. `ops` must be a724 list of :class:`Operand`\s.724 list of :class:`Operand`\\s.725 """726 fields = ('expr', 'ops')727728 def as_const(self, eval_ctx=None):
211 unmodified lines
modified:jinja2/runtime.py+1 added-1 removed
98 unmodified lines
99100 The context is immutable. Modifications on :attr:`parent` **must not**101 happen and modifications on :attr:`vars` are allowed from generated102 template code only. Template filters and global functions marked as103 :func:`contextfunction`\s get the active context passed as first argument103 :func:`contextfunction`\\s get the active context passed as first argument104 and are allowed to access the context read-only.105106 The template context supports read only dict operations (`get`,107 `keys`, `values`, `items`, `iterkeys`, `itervalues`, `iteritems`,
626 unmodified lines
modified:CHANGES+6 added
1Jinja2 Changelog2================34Version 2.9.45-------------6(unreleased bugfix release)78- Solved some warnings for string literals. (#646)910Version 2.9.311-------------12(bugfix release, released on January 8th 2017)13
465 unmodified lines