kr.motd.maven.sphinx.dist.jinja2.utils$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
???? 1? f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__ ?
jinja2.utils
~~~~~~~~~~~~
Utility functions.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
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
json " errno $ collections & java/lang/String ( deque *
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject; , -
. threading 0 Lock 2 jinja2._compat 4 text_type 6 string_types 8 implements_iterator : url_quote < getname .(Ljava/lang/String;)Lorg/python/core/PyObject; > ?
@ compile B org/python/core/PyObject D __getattr__ F ?
E G (\s+) I __call__ S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; K L
E M _word_split_re O 4^(?P(?:%s)*)(?P.*?)(?P(?:%s)*)$ Q org/python/core/PyTuple S | U join W map Y escape [ ( ] < _ < a ([Lorg/python/core/PyObject;)V c d
T e m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; K g
E h . j , l ) n > p
r > t _mod 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; v w
E x _punctuation_re z &^\S+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+$ | _simple_email_re ~ (|<[^>]*>) ?
_striptags_re ? &([^;]+); ?
_entity_re ? 4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ? _letters ?
0123456789 ? _digits ? type ? MissingType ? org/python/core/Py ? EmptyObjects [Lorg/python/core/PyObject; ? ? ? ? org/python/core/PyDictionary ? __repr__ ? org/python/core/PyFunction ? f_globals Lorg/python/core/PyObject; ? ? ? f$1 missing ? f_lasti I ? ? ? jinja2/utils$py ? Lorg/python/core/PyCode; ? ? ? ? P(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)V c ?
? ?
? e ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; K ?
E ? 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; K ?
E ? set ?
internal_code ? ? org/python/core/PyUnicode ? /(Ljava/lang/String;)Lorg/python/core/PyUnicode; ?
? ? concat ? \/ ? dumps ? / ? _notin ? w
E ?
_slash_escape ? contextfunction$2+This decorator can be used to mark a function or method context callable.
A context callable is passed the active :class:`Context` as first argument when
called from the template. This is useful if a function wants to get access
to the context or functions provided on the context object. For example
a function that returns a sorted list of template variables the current
template exports could look like this::
@contextfunction
def get_exported_names(context):
return sorted(context.exported_vars)
? True ? getglobal ? ?
? getlocal (I)Lorg/python/core/PyObject; ? ?
? contextfunction ? __setattr__ ?
E ? ? ? ? ? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V c ?
? ? evalcontextfunction$3GThis decorator can be used to mark a function or method as an eval
context callable. This is similar to the :func:`contextfunction`
but instead of passing the context, an evaluation context object is
passed. For more information about the eval context, see
:ref:`eval-context`.
.. versionadded:: 2.4
? evalcontextfunction ? ? ? ? ? environmentfunction$4 ?This decorator can be used to mark a function or method as environment
callable. This decorator works exactly like the :func:`contextfunction`
decorator just that the first argument is the active :class:`Environment`
and not context.
? environmentfunction ? ? ? ? ? internalcode$5 %Marks the function as internally used ? add ? __code__ ? ? ? ? ? internalcode ? is_undefined$6?Check if the object passed is undefined. This does nothing more than
performing an instance check against :class:`Undefined` but looks nicer.
This can be used for custom filters or tests that want to react to
undefined variables. For example a custom default filter can look like
this::
def default(var, default=''):
if is_undefined(var):
return default
return var
jinja2.runtime Undefined (ILorg/python/core/PyObject;)V
isinstance ? ?
is_undefined consume$7 4Consumes an iterable without doing anything with it. __iter__ ()Lorg/python/core/PyObject;
E __iternext__
E None ? ? ? ? consume clear_caches$8"Jinja2 keeps internal caches for environments and lexers. These are
used so that Jinja2 doesn't have to recreate environments and lexers all
the time. Normally you don't have to care about that but if you are
measuring memory consumption you may want to clean the caches.
# jinja2.environment% _spontaneous_environments' jinja2.lexer) _lexer_cache+ clear-" ? ?/ clear_caches1 False3 import_string$9?Imports an object based on a string. This is useful if you want to
use import paths as endpoints or something similar. An import path can
be specified either in dotted notation (``xml.sax.saxutils.escape``)
or with a colon as object delimiter (``xml.sax.saxutils:escape``).
If the `silent` is True the return value will be `None` if the import
fails.
:return: imported object
6 :8 _in: w
E; __nonzero__ ()Z=>
E? splitA
newInteger (I)Lorg/python/core/PyInteger;CD
?E unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject;GH
?I __getslice__ j(Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;KL
EM __getitem__O w
EP
__import__R getattrT org/python/core/PyListW
X e ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; KZ
E[ setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;]^
?_ ImportErrora AttributeErrorc org/python/core/PyExceptione match (Lorg/python/core/PyObject;)Zgh
fi __not__k
El
makeException ()Lorg/python/core/PyException;no
?p java/lang/Throwabler5 ? ?t
import_stringv rbx open_if_exists$10 ZReturns a file descriptor for the filename if that file exists,
otherwise `None`.
{ open} IOError value? ? f? ENOENT? EISDIR? EINVAL?z ? ?? open_if_exists? object_type_repr$11 ?Returns the name of the object's type. For some recognized
singletons the name of the object is returned instead. (For
example for `None` and `Ellipsis`).
? _is? w
E? Ellipsis? __class__?
__module__? __builtin__? builtins? __name__? _add? w
E? %s object?? ? ?? object_type_repr?
pformat$12 YPrettyprint an object. Either use the `pretty` library or the
builtin `pprint`.
? pretty? verbose? g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; K?
E? pprint? pformat?? ? ?? urlize$13Converts any URLs in text into clickable links. Works on http://,
https:// and www. links. Links can have trailing punctuation (periods,
commas, close-parens) and leading punctuation (opening parens) and
it'll still do the right thing.
If trim_url_limit is not None, the URLs in link text will be limited
to trim_url_limit characters.
If nofollow is True, the URLs in link text will get a rel="nofollow"
attribute.
If target is not None, a target attribute will be added to the link.
? f$14 _isnot? w
E? len? _ge? w
E? ...?? ? ?? rel="%s"? target="%s"? enumerate?g groups?
startswith? www.? @? http://? https://? _gt? w
E? endswith? .org? .net? .com? %s? %s? %s? _ne? w
E? __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V??
E?? ? ?? urlize? generate_lorem_ipsum$15 +Generate some lorem ipsum for the template.? jinja2.constants? LOREM_IPSUM_WORDS? random? choice randrange range
capitalize _sub w
E
_iadd w
E
append
Markup f$16 %s
java/lang/Object
f_savedlocals [Ljava/lang/Object; getGeneratorInput ()Ljava/lang/Object; !
" ? ?$ java/util/Arrays& fill (([Ljava/lang/Object;Ljava/lang/Object;)V()
'*? ? ?, generate_lorem_ipsum. utf-80 unicode_urlencode$17&URL escapes a single bytestring or unicode string with the
given charset if applicable to URL safe quoting under all rules
that need to be considered under all supported Python versions.
If non strings are provided they are converted to their unicode
representation first.
3 encode5 replace7 %209 +;2 ? ?= unicode_urlencode? objectA LRUCacheC LRUCache$18 "A simple LRU Cache implementation.F __init__$19 capacityI _mappingK _queueM _postinitOH ? ?Q __init__S _postinit$20 popleftV _popleftX popZ _pop\ remove^ _remove` _wlockb _appenddU ? ?f __getstate__$21h ? ?i __getstate__k __setstate__$22 __dict__n updatepm ? ?r __setstate__t __getnewargs__$23v ? ?w __getnewargs__y copy$24 &Return a shallow copy of the instance.|{ ? ?~ copy? get$25 /Return an item from the cache dict or `default`? KeyError?? ? ?? get?
setdefault$26 vSet `default` if the key is not in the cache otherwise
leave unchanged. Return the value of this key.
? acquire? release? addTraceback 1(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)V??
??? ? ??
setdefault? clear$27 Clear the cache.?? ? ?? __contains__$28 $Check if a key exists in this cache.?? ? ?? __contains__?
__len__$29 %Return the current size of the cache.?? ? ?? __len__? __repr__$30 <%s %r>?? ? ?? __getitem__$31 ?Get an item from the cache. Moves the item up so that it has the
highest priority then.
Raise a `KeyError` if it does not exist.
?
ValueError?? ? ??O __setitem__$32 hSets the value for an item. Moves the item up so that it
has the highest priority then.
? _eq? w
E? __delitem__ (Lorg/python/core/PyObject;)V??
E?? ? ??? __delitem__$33 ]Remove an item from the cache dict.
Raise a `KeyError` if it does not exist.
?? ? ??? items$34 Return a list of items.? ()V c?
X? list? dellocal?
? reverse?? ? ?? items? iteritems$35 Iterate over all items.? iter?? ? ?? iteritems? values$36 Return a list of all values.?? ? ?? values? itervalue$37 Iterate over all values.?? ? ?? itervalue? keys$38 7Return a list of all keys ordered by most recent usage.?? ? ?? keys? iterkeys$39 [Iterate over all keys in the cache dict, ordered by
the most recent usage.
? reversed? tuple? ? ? iterkeys __reversed__$40 VIterate over the values in the cache dict, oldest items
coming first.
? ? __reversed__
__copy__ getf_locals
E ? ? makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject;
? MutableMapping register html htm xml" select_autoescape$41 to_cell (II)V%&
'cIntelligently sets the initial value of autoescaping based on the
filename of the template. This is the recommended way to configure
autoescaping if you do not want to write a custom function yourself.
If you want to enable it for all templates created from strings or
for all templates with `.html` and `.xml` extensions::
from jinja2 import Environment, select_autoescape
env = Environment(autoescape=select_autoescape(
enabled_extensions=('html', 'xml'),
default_for_string=True,
))
Example configuration to turn it on at all times except if the template
ends with `.txt`::
from jinja2 import Environment, select_autoescape
env = Environment(autoescape=select_autoescape(
disabled_extensions=('txt',),
default_for_string=True,
default=True,
))
The `enabled_extensions` is an iterable of all the extensions that
autoescaping should be enabled for. Likewise `disabled_extensions` is
a list of all templates it should be disabled for. If a template is
loaded from a string then the default from `default_for_string` is used.
If nothing matches then the initial value of autoescaping is set to the
value of `default`.
For security reasons this function operates case insensitive.
.. versionadded:: 2.9
) f$42 lstrip, lower.+ ? ?0 setderef2
3 f$435 ? ?6
autoescape$44 getderef9 ?
:8 ? ?<
getclosure> ?
? ?(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;[Lorg/python/core/PyObject;)V cA
?B$ ? ?D select_autoescapeF htmlsafe_json_dumps$45?Works exactly like :func:`dumps` but is safe for use in ``