![JAR search and dependency download from the Maven repository](/logo.png)
kr.motd.maven.sphinx.dist.pygments.util$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
???? 1x f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__ ?
pygments.util
~~~~~~~~~~~~~
Utility functions.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for 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
sys " getname .(Ljava/lang/String;)Lorg/python/core/PyObject; $ %
& compile ( org/python/core/PyObject * __getattr__ , %
+ - [/\\ ] / __call__ S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; 1 2
+ 3
split_path_re 5 ?
(<\?.*?\?>)?\s*
]*>
7 DOTALL 9 MULTILINE ; _or 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; = >
+ ? VERBOSE A m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; 1 C
+ D doctype_lookup_re F <(.+?)(\s.*?)?>.*? H UNICODE J
IGNORECASE L tag_re N \s*<\?xml[^>]*\?> P I R xml_decl_re T
ValueError V
ClassNotFound X ClassNotFound$1
__module__ [ __name__ ] CRaised if one of the lookup functions didn't find a matching class. _ getf_locals ()Lorg/python/core/PyObject; a b
c pygments/util$py e Lorg/python/core/PyCode; Z g f h org/python/core/Py j makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject; l m
k n java/util/Arrays p fill (([Ljava/lang/Object;Ljava/lang/Object;)V r s
q t Exception v OptionError x
OptionError$2 z g f { None } False org/python/core/PyFunction ? f_globals Lorg/python/core/PyObject; ? ? ? get_choice_opt$3 getlocal (I)Lorg/python/core/PyObject; ? ?
? get ? (ILorg/python/core/PyObject;)V ?
? __nonzero__ ()Z ? ?
+ ? lower ? 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; 1 ?
+ ? _notin ? >
+ ? getglobal ? %
? %Value for option %s must be one of %s ? org/python/core/PyTuple ? , ? join ? map ? str ? ([Lorg/python/core/PyObject;)V ? ?
? ? _mod ? >
+ ?
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException; ? ?
k ? f_lasti ? R ? ? g f ? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V ? ?
? ? get_choice_opt ? get_bool_opt$4
isinstance ? bool ? int ? string_types ? __not__ ? b
+ ? BInvalid type %r for option %s; use 1/0, yes/no, true/false, on/off ? 1 ? yes ? true ? on ? _in ? >
+ ? True ? 0 ? no ? false ? off ? CInvalid value %r for option %s; use 1/0, yes/no, true/false, on/off ? ? g f ? get_bool_opt ?
get_int_opt$5 setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException; ? ?
k ? TypeError ? org/python/core/PyException ? match (Lorg/python/core/PyObject;)Z ? ?
? ? =Invalid type %r for option %s; you must give an integer value ? >Invalid value %r for option %s; you must give an integer value ? java/lang/Throwable ? } ? k ? ? g f ? get_int_opt get_list_opt$6 split list tuple 9Invalid type %r for option %s; you must give a list value
g f get_list_opt EmptyObjects [Lorg/python/core/PyObject; k docstring_headline$7 org/python/core/PyList
? strip
splitlines __iter__ b
+ append! # _add% >
+& __iternext__( b
+) lstrip+ g f- docstring_headline/ make_analysator$8 to_cell (II)V23
4 AReturn a static text analyser function that returns float values.6 text_analyse$9 getderef9 ?
: newFloat (D)Lorg/python/core/PyFloat;>?
k@ minB?? maxF floatH8 g fJ
getclosureL ?
M ?(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;[Lorg/python/core/PyObject;)V ?O
?P __setattr__R
+S staticmethodU1 g fW make_analysatorY shebang_matches$10?Check if the given regular expression matches the last part of the
shebang if one exists.
>>> from pygments.util import shebang_matches
>>> shebang_matches('#!/usr/bin/env python', r'python(2\.\d)?')
True
>>> shebang_matches('#!/usr/bin/python2.4', r'python(2\.\d)?')
True
>>> shebang_matches('#!/usr/bin/python-ruby', r'python(2\.\d)?')
False
>>> shebang_matches('#!/usr/bin/python/ruby', r'python(2\.\d)?')
False
>>> shebang_matches('#!/usr/bin/startsomethingwith python',
... r'python(2\.\d)?')
True
It also checks for common windows executable file extensions::
>>> shebang_matches('#!C:\\Python2.4\\Python.exe', r'python(2\.\d)?')
True
Parameters (``'-f'`` or ``'--foo'`` are ignored so ``'perl'`` does
the same as ``'perl -e'``)
Note that this method automatically searches the whole string (eg:
the regular expression is wrapped in ``'^$'``)
\ find^
`
newInteger (I)Lorg/python/core/PyInteger;bc
kd _gef >
+g __getslice__ j(Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;ij
+k
startswithm #!o ()V ?q
r -t dellocalv
w __getitem__y >
+z
IndexError| ^%s(\.(exe|cmd|bat|bin))?$~ search? _isnot? >
+?[ g f? shebang_matches? doctype_matches$11 ?Check if the doctype matches a regular expression (if present).
Note that this method only checks the first part of a DOCTYPE.
eg: 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
? ? _is? >
+? group?? g f? doctype_matches? html_doctype_matches$12 3Check if the file looks like it has a html doctype.? html?? g f? html_doctype_matches? org/python/core/PyDictionary?
? ? _looks_like_xml_cache? looks_like_xml$13 2Check if a doctype exists or if we have some tags.? hash? KeyError? __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V??
+?? g f? looks_like_xml? _surrogatepair$14 ?? _rshift? >
+? ? _and? >
+?? g f? _surrogatepair? unirange$15 EReturns a regular expression string to match the given non-BMP range.? _lt? >
+? Bad character range? +unirange is only defined for non-BMP ranges?
maxunicode? ?? _gt? >
+? [%s-%s]? org/python/core/PyUnicode? /(Ljava/lang/String;)Lorg/python/core/PyUnicode; ?
?? unichr? unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject;??
k? _eq? >
+?
(?:%s[%s-%s])? %s[%s-%s]? ?? _sub? >
+? [%s-%s][%s-%s]? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; 1?
+? _ne? >
+? (?:? |? )?? g f? unirange? format_lines$16 )Formats a sequence of strings for output.? _mul? >
+? = ( , repr "? g f format_lines duplicates_removed$17 a
Returns a list with duplicates removed from the iterable `it`.
Order is preserved.
set add
g f duplicates_removed object Future Future$18 ?Generic class to defer some work.
Handled specially in RegexLexerMeta, to support regex string construction at
first use.
get$19 NotImplementedError g f" g f$ guess_decode$20 ?Decode *text* with guessed encoding.
First try UTF-8; this should fail for non-UTF-8 encodings.
Then try the preferred locale encoding.
Fall back to latin-1, which always works.
' decode) utf-8+ UnicodeDecodeError- locale/ getpreferredencoding1 LookupError3 latin15&