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
Provenance
- Commit
be16786- Tree
9120ac0- Author
Armin Ronacher <armin.ronacher@active-4.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent
b8bd94a
4 files changed+12 added−6 removed
modified:jinja2/lexer.py+4 added-4 removed
286 unmodified lines287 288 289 @implements_iterator290 class 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 lines499 (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 linesmodified:jinja2/nodes.py+1 added-1 removed
719 unmodified lines720 721 722 class 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')727 728 def as_const(self, eval_ctx=None):211 unmodified linesmodified:jinja2/runtime.py+1 added-1 removed
98 unmodified lines99 100 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.105 106 The template context supports read only dict operations (`get`,107 `keys`, `values`, `items`, `iterkeys`, `itervalues`, `iteritems`,626 unmodified linesmodified:CHANGES+6 added
1 Jinja2 Changelog2 ================3 4+Version 2.9.45+-------------6+(unreleased bugfix release)7+8+- Solved some warnings for string literals. (#646)9+10 Version 2.9.311 -------------12 (bugfix release, released on January 8th 2017)13 465 unmodified lines