kr.motd.maven.sphinx.dist.jinja2.ext$py.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sphinx-maven-plugin Show documentation
Show all versions of sphinx-maven-plugin Show documentation
Maven plugin that creates the site with Sphinx
???? 1v f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__
jinja2.ext
~~~~~~~~~~
Jinja extensions allow to add custom tags similar to the way django custom
tags work. By default two example extensions exist: an i18n and a cache
extension.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD.
org/python/core/PyString fromInterned .(Ljava/lang/String;)Lorg/python/core/PyString;
org/python/core/PyFrame
setglobal /(Ljava/lang/String;Lorg/python/core/PyObject;)V
setline (I)V
re org/python/core/imp importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject;
setlocal
jinja2 " java/lang/String $ nodes &
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject; ( )
* jinja2.defaults , BLOCK_START_STRING . BLOCK_END_STRING 0 VARIABLE_START_STRING 2 VARIABLE_END_STRING 4 COMMENT_START_STRING 6 COMMENT_END_STRING 8 LINE_STATEMENT_PREFIX : LINE_COMMENT_PREFIX < TRIM_BLOCKS > NEWLINE_SEQUENCE @ KEEP_TRAILING_NEWLINE B
LSTRIP_BLOCKS D jinja2.environment F Environment H jinja2.runtime J concat L jinja2.exceptions N TemplateAssertionError P TemplateSyntaxError R jinja2.utils T contextfunction V
import_string X Markup Z jinja2._compat \ with_metaclass ^ string_types ` iteritems b org/python/core/PyTuple d org/python/core/PyObject f _ h gettext j ngettext l ([Lorg/python/core/PyObject;)V n o
e p GETTEXT_FUNCTIONS r type t getname .(Ljava/lang/String;)Lorg/python/core/PyObject; v w
x ExtensionRegistry z ExtensionRegistry$1
__module__ } __name__ )Gives the extension an unique identifier. ? org/python/core/Py ? EmptyObjects [Lorg/python/core/PyObject; ? ? ? ? org/python/core/PyFunction ? f_globals Lorg/python/core/PyObject; ? ? ? __new__$2 getglobal ? w
? __new__ ? __getattr__ ? w
g ? getlocal (I)Lorg/python/core/PyObject; ? ?
? __call__ ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
g ? (ILorg/python/core/PyObject;)V ?
? . ? _add 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
g ?
identifier ? __setattr__ ?
g ? f_lasti I ? ? ?
jinja2/ext$py ? Lorg/python/core/PyCode; ? ? ? ? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V n ?
? ? getf_locals ()Lorg/python/core/PyObject; ? ?
? | ? ? ? makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject; ? ?
? ? java/util/Arrays ? fill (([Ljava/lang/Object;Ljava/lang/Object;)V ? ?
? ? object ? m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
g ? Extension ? Extension$3gExtensions can be used to add extra functionality to the Jinja template
system at the parser level. Custom extensions are bound to an environment
but may not store environment specific data on `self`. The reason for
this is that an extension can be bound to another environment (for
overlays) by creating a copy and reassigning the `environment` attribute.
As extensions are created by the environment they cannot accept any
arguments for configuration. One may want to work around that by using
a factory function, but that is not possible as extensions are identified
by their import name. The correct way to configure the extension is
storing the configuration values on the environment. Because this way the
environment ends up acting as central configuration storage the
attributes may clash which is why extensions have to ensure that the names
they choose for configuration are not too generic. ``prefix`` for example
is a terrible name, ``fragment_cache_prefix`` on the other hand is a good
name as includes the name of the extension (fragment cache).
? set ? 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; ? ?
g ? tags ?
newInteger (I)Lorg/python/core/PyInteger; ? ?
? ? priority ?
__init__$4 environment ? None ? ? ? ? ? ? ? ? __init__ ? bind$5 =Create a copy of this extension bound to another environment. ? __class__ ? S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
g ? __dict__ ? update ? ? ? ? ? bind ? ? preprocess$6 ?This method is called before the actual lexing and can be used to
preprocess the source. The `filename` is optional. The return value
must be the preprocessed source.
? ? ? ? ?
preprocess filter_stream$7?It's passed a :class:`~jinja2.lexer.TokenStream` that can be used
to filter tokens returned. This method has to return an iterable of
:class:`~jinja2.lexer.Token`\s, but it doesn't have to return a
:class:`~jinja2.lexer.TokenStream`.
In the `ext` folder of the Jinja2 source distribution there is a file
called `inlinegettext.py` which implements a filter that utilizes this
method.
? ?
filter_stream parse$8If any of the :attr:`tags` matched this method is called with the
parser as first argument. The token the parser stream is pointing at
is the name token that matched. This method has to return one or a
list of multiple nodes.
NotImplementedError
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException;
?
? ? parse attr$9 ?Return an attribute node for the current extension. This is useful
to pass constants on extensions to generated template code.
::
self.attr('_my_attribute', lineno=lineno)
ExtensionAttribute lineno g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; ?
g ? ?! attr# call_method$10 sCall a method of the extension. This is a shortcut for
:meth:`attr` + :class:`jinja2.nodes.Call`.
& _is( ?
g) __nonzero__ ()Z+,
g- org/python/core/PyList/
0 p Call2% ? ?4 call_method6 ? ? ?8 _gettext_alias$11 call; resolve=
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;?@
gA: ? ?C _gettext_aliasE _make_new_gettext$12 to_cell (II)VHI
J
gettext$13 getderefM ?
N eval_ctxP
autoescapeR _modT ?
gUL ? ?W
getclosureY ?
Z ?(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;[Lorg/python/core/PyObject;)V n\
?]G ? ?_ _make_new_gettexta _make_new_ngettext$14 ngettext$15
setdefaulte numgd ? ?ic ? ?k _make_new_ngettextm InternationalizationExtensiono InternationalizationExtension$16 .This extension adds gettext support to Jinja2.r transt __init__$17 globalsw __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Vyz
g{ extend} _install
_install_null? _install_callables?
_uninstall? _extract? False? install_gettext_translations? install_null_translations? install_gettext_callables? uninstall_gettext_translations? extract_translations? newstyle_gettext?v ? ?? _install$18 getattr? ugettext? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ??
g? ungettext?? ? ?? _install_null$19 f$20? ? ?? P(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)V n?
?? f$21 _ne? ?
g? __getitem__? ?
g?? ? ??? ? ?? _install_callables$22 _isnot? ?
g?? ? ??
_uninstall$23 __iter__? ?
g? pop? __iternext__? ?
g?? ? ?? _extract$24
isinstance? extract_from_ast?? ? ?? parse$25 Parse a translatable tag.? next? stream? org/python/core/PyDictionary?
? p expect? comma? skip_if? colon? name? value? _in? ?
g? fail? 'translatable variable %r defined twice.? exc? current? assign? _eq? ?
g? parse_expression? trimmed? notrimmed? Name? load? _trans? Assign store block_end _parse_block True unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject;
?
test name:pluralize _notin ?
g %unknown variable %r for pluralization __not__ ?
g pluralize without variables policies ext.i18n.trimmed _trim_whitespace!
_make_node# bool% T(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ?'
g(
set_lineno*? ? ?, compile. \s*\n\s*0 _trim_whitespace$26 sub3 5 strip72 ? ?9 _parse_block$27 1Parse until the next block tag with a given name.< data> append@ replaceB %D %%F variable_beginH %%(%s)sJ variable_endL block_beginN
name:endtransP :a translatable section can have only one pluralize sectionR ;control structures in translatable sections are not allowedT eosV unclosed translation blockX __debug__Z internal parser error\ AssertionError^ S(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyException;`
?a; ? ?c
_make_node$28 /Generates a useful node from the data provided.f Consth kwargsj Keywordl MarkSafeIfAutoescapen Modp Dictr ()V nt
0u itemsw Pairy dellocal{
| Output~e ? ??q ? ?? ExprStmtExtension? ExprStmtExtension$29 sAdds a `do` tag to Jinja2 that works like the print statement just
that it doesn't print the return value.
? do? parse$30 ExprStmt? parse_tuple? node?? ? ??? ? ?? LoopControlExtension? LoopControlExtension$31 /Adds break and continue to the template engine.? break? continue? parse$32 Break? Continue?? ? ??? ? ??
WithExtension? WithExtension$33? ? ?? AutoEscapeExtension? AutoEscapeExtension$34? ? ?? extract_from_ast$35?Extract localizable strings from the given template node. Per
default this function returns matches in babel style that means non string
parameters as well as keyword arguments are returned as `None`. This
allows Babel to figure out what you really meant if you are using
gettext functions that allow keyword arguments for placeholder expansion.
If you don't want that behavior set the `babel_style` parameter to `False`
which causes only strings to be returned and parameters are always stored
in tuples. As a consequence invalid gettext calls (calls without a single
string parameter or string parameters after non-string parameters) are
skipped.
This example explains the behavior:
>>> from jinja2 import Environment
>>> env = Environment()
>>> node = env.parse('{{ (_("foo"), _(), ngettext("foo", "bar", 42)) }}')
>>> list(extract_from_ast(node))
[(1, '_', 'foo'), (1, '_', ()), (1, 'ngettext', ('foo', 'bar', None))]
>>> list(extract_from_ast(node, babel_style=False))
[(1, '_', ('foo',)), (1, 'ngettext', ('foo', 'bar'))]
For every string found this function yields a ``(lineno, function,
message)`` tuple, where:
* ``lineno`` is the number of the line on which the string was found,
* ``function`` is the name of the ``gettext`` function used (if the
string was extracted from embedded Python code), and
* ``message`` is the string itself (a ``unicode`` object, or a tuple
of ``unicode`` objects for functions with multiple string arguments).
This extraction function operates on the AST and is because of that unable
to extract any comments. For comment support you have to use the babel
extraction interface or extract comments yourself.
? find_all? args? dyn_args?
dyn_kwargs? tuple? f$36 java/lang/Object?
f_savedlocals [Ljava/lang/Object;?? ? getGeneratorInput ()Ljava/lang/Object;??
? org/python/core/PyException? java/lang/Throwable?? ? ?? len?? ? ?? _CommentFinder? _CommentFinder$37 ?Helper class to find comments in a token stream. Can only
find comments for gettext calls forwards. Once the comment
from line 4 is found, a comment for line 1 will not return a
usable value.
? __init__$38 tokens? comment_tags? offset? last_lineno?? ? ?? find_backwards$39 reversed? __getslice__ j(Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;??
g? comment? linecomment? split? setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;??
??
ValueError? match (Lorg/python/core/PyObject;)Z??
?? rstrip? addTraceback 1(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)V??
??? ? ? find_backwards find_comments$40 _gt ?
g enumerate ? ?
find_comments
? ? ? babel_extract$41Babel extraction method for Jinja templates.
.. versionchanged:: 2.3
Basic support for translation comments was added. If `comment_tags`
is now set to a list of keywords for extraction, the extractor will
try to find the best preceeding comment that begins with one of the
keywords. For best results, make sure to not have more than one
gettext call in one line of code and the matching comment in the
same line or the line before.
.. versionchanged:: 2.5.1
The `newstyle_gettext` flag can be set to `True` to enable newstyle
gettext calls.
.. versionchanged:: 2.7
A `silent` option can now be provided. If set to `False` template
syntax errors are propagated instead of being ignored.
:param fileobj: the file-like object the messages should be extracted from
:param keywords: a list of keywords (i.e. function names) that should be
recognized as translation functions
:param comment_tags: a list of translator tags to search for and include
in the results.
:param options: a dictionary of additional options (optional)
:return: an iterator over ``(lineno, funcname, message, comments)`` tuples.
(comments will be empty currently)
get
extensions , add
getbool$42 str lower! 1# on% yes' true) ? ?+ silent- block_start_string/ block_end_string1 variable_start_string3 variable_end_string5 comment_start_string7 comment_end_string9 line_statement_prefix; line_comment_prefix= trim_blocks?
lstrip_blocksA keep_trailing_newlineC frozensetE
cache_sizeG auto_reloadI readK decodeM encodingO utf-8Q listS lexU? ? ?W ()Lorg/python/core/PyException;Y
?Z ? ?\
babel_extract^ i18n` loopcontrolsb with_d (Ljava/lang/String;)V org/python/core/PyFunctionTableg
hu self Ljinja2/ext$py;jk ?l n newCode ?(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZLorg/python/core/PyFunctionTable;I[Ljava/lang/String;[Ljava/lang/String;II)Lorg/python/core/PyCode;pq
?r ? ?t clsv basesx dz rv|j source filename? parser? __context? func? __string? variables?
__singular? __plural? __num? translations? newstyle? x? ? s? p? n? key? gettext_functions? num_called_num? plural_expr? plural_expr_assignment? var? plural? have_plural?
referenced? singular_names? singular? plural_names? string? _ws_re? allow_pluralize? buf? vars_referenced? _[400_20]? token? babel_style? strings? arg? _(494_28)? _(x)? ?
token_type? token_value? prefix? idx? token_lineno? fileobj? keywords? options? extension? getbool? e? finder? message? default? getMain ()Lorg/python/core/PyCode; main ([Ljava/lang/String;)V ? nf
????
?? org/python/core/CodeLoader? createSimpleBootstrap 9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;??
?? runMain 5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)V??
? getCodeBootstrap !()Lorg/python/core/CodeBootstrap; #org/python/core/PyRunnableBootstrap )getFilenameConstructorReflectionBootstrap 2(Ljava/lang/Class;)Lorg/python/core/CodeBootstrap;
call_function S(ILorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;
? |
? ?
? ?
? ?
? ?
? ?
?
?
?
?%
? :
?"G
?$L
?&c
?(d
?*q
?,v
?.?
?0?
?2?
?4?
?6?
?8?
?:?
?<?
?>2
?@;
?Be
?D?
?F?
?H?
?J?
?L?
?N?
?P?
?R?
?T?
?V?
?X?
?Z
?\
?^
?` org/python/core/PyRunnableb Lorg/python/compiler/APIVersion; % Lorg/python/compiler/MTime; `9?h Lorg/python/compiler/Filename; T/home/trustin/Workspaces/sphinx-maven-plugin/target/update-sphinx/dist/jinja2/ext.py org/python/core/ThreadStatek ?? [Ljava/lang/String;o Code LineNumberTable StackMap
SourceFile RuntimeVisibleAnnotations ! ?h c , jk ? | ? ? ? ? ? ? ? ? ? ? ? ?
? ? % ? : ? G ? L ? c ? d ? q ? v ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 2 ? ; ? e ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 q ?+? ? +? ? W+
? +? N+-? !N+? #? %N-'S-+? +N-2:+'? !:+? -? %N-/S-1S-3S-5S-7S-9S-;S-=S-?S- AS-
CS-ES-+? +N-2:+/? !:-2:+1? !:-2:+3? !:-2:+5? !:-2:+7? !:-2:+9? !:-2:+;? !:-2:+=? !:-2:+?? !:- 2:+A? !:-
2:+C? !:-2:+E? !:+? G? %N-IS-+? +N-2:+I? !:+? K? %N-MS-+? +N-2:+M? !:+? O? %N-QS-SS-+? +N-2:+Q? !:-2:+S? !:+? U? %N-WS-YS-[S-+? +N-2:+W? !:-2:+Y? !:-2:+[? !:+? ]? %N-_S-aS-cS-+? +N-2:+_? !:-2:+a? !:-2:+c? !:+? ? eY? gYi? SYk? SYm? S? qN+s-? !N+"? ? gN+u? y-__S{-? ?? ?:+{? !:-? ?++? ? gN+_? y,+{? y+˶ y? ?-__S?-?9? ?:+?? !:-? ?+ ?? ? ?N? ?Y+? ?-?D? ?N+W? y,-? ?N-N+F-? !N+ ?? ? ?N? ?Y+? ?-?`? ?N+b-? !N+ ?? ? ?N? ?Y+? ?-?l? ?N+n-? !N+ ?? ? gN+ж y-__Sp-??? ?:+p? !:-? ?+?? ? gN+ж y-__S?-??? ?:+?? !:-? ?+?? ? gN+ж y-__S?-??? ?:+?? !:-? ?+?? ? gN+ж y-__S?-??? ?:+?? !:-? ?+?? ? gN+ж y-__S?-??? ?:+?? !:-? ?+?? ? gN+s? y-__S+
? y-__S? ?Y+? ?-???? ? ?N+?-? !N+?? ? gN+˶ y-__S?-?? ?:+?? !:-? ?+? ? ?N? ?Y+? ?-?]? ? ?N+_-? !N+o? +p? yN+a-? !N+p? +?? yN+?-? !N+q? +?? yN+c-? !N+r? +?? yN+e-? !N+s? +?? yN+S-? !N+? ?? ? r r
" + ? ? ? ? ? ? ? ? ? ? o p q r s | q h L+~+?? y? !+?? ? !+#? ?? W+%? ? ?N? ?Y+? ?-? ?? ?N+?-? !N+? ?? r
# % ? q ? x+&? +u? ??? ?,+? ?+? ?+? ?+? ?? ?N+-? ?N+'? +? ?~? ??? ? ?+? ??? ?? ?N+? ??-? ?N+(? +? ?N+? ?-? r &