/opt/alt/python37/lib/python3.7/site-packages/babel/__pycache__
NameSizeModeActions
core.cpython-37.opt-1.pyc352160644editdlrm
core.cpython-37.pyc352160644editdlrm
dates.cpython-37.opt-1.pyc554440644editdlrm
dates.cpython-37.pyc554870644editdlrm
languages.cpython-37.opt-1.pyc31080644editdlrm
languages.cpython-37.pyc31080644editdlrm
lists.cpython-37.opt-1.pyc26780644editdlrm
lists.cpython-37.pyc26780644editdlrm
localedata.cpython-37.opt-1.pyc78870644editdlrm
localedata.cpython-37.pyc78870644editdlrm
numbers.cpython-37.opt-1.pyc320140644editdlrm
numbers.cpython-37.pyc321300644editdlrm
plural.cpython-37.opt-1.pyc219900644editdlrm
plural.cpython-37.pyc219900644editdlrm
support.cpython-37.opt-1.pyc228320644editdlrm
support.cpython-37.pyc228320644editdlrm
units.cpython-37.opt-1.pyc85080644editdlrm
units.cpython-37.pyc85080644editdlrm
util.cpython-37.opt-1.pyc70040644editdlrm
util.cpython-37.pyc70040644editdlrm
_compat.cpython-37.opt-1.pyc21410644editdlrm
_compat.cpython-37.pyc21410644editdlrm
__init__.cpython-37.opt-1.pyc9040644editdlrm
__init__.cpython-37.pyc9040644editdlrm
Edit: /opt/alt/python37/lib/python3.7/site-packages/babel/__pycache__/util.cpython-37.pyc (7004B)
B `@sdZddlZddlZddlmZmZddlZddlZddlZddl m Z m Z ddl Z ddlmZeZddZedejZd d Zed Zdd dZddZGdddejZdddZejZGdddeZe jZ ej!Z!ej"Z"ej#Z#ej$Z$ej%Z%ej&Z&dS)z babel.util ~~~~~~~~~~ Various utility classes and functions. :copyright: (c) 2013-2021 by the Babel Team. :license: BSD, see LICENSE for more details. N) timedeltatzinfo)izipimap) localtimeccs4t}x(t|D]}||kr|V||qWdS)aYield all items in an iterable collection that are distinct. Unlike when using sets for a similar effect, the original ordering of the items in the collection is preserved by this function. >>> print(list(distinct([1, 2, 1, 3, 4, 4]))) [1, 2, 3, 4] >>> print(list(distinct('foobar'))) ['f', 'o', 'b', 'a', 'r'] :param iterable: the iterable collection providing the data N)setiteradd)iterableseenitemr ;/opt/alt/python37/lib/python3.7/site-packages/babel/util.pydistincts rs([ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)c Cs|}|dz|}|tj}|r>|ttjd}t|}|syddl }| | dWnt t tfk rYnX|}t|}|r|r|d d}|dkrt d|dS|r|d dSdSWd||XdS)a/Deduce the encoding of a source file from magic comment. It does this in the same way as the `Python interpreter`__ .. __: https://docs.python.org/3.4/reference/lexical_analysis.html#encoding-declarations The ``fp`` argument should be a seekable file object. (From Jeff Dairiki) rNzlatin-1zutf-8zencoding problem: {0} with BOM)tellseekreadline startswithcodecsBOM_UTF8lenPYTHON_MAGIC_COMMENT_rematchastparsedecode ImportError SyntaxErrorUnicodeEncodeErrorgroupformat)fpposZline1Zhas_bommrZline2Zmagic_comment_encodingr r rparse_encoding1s8     r%z'from\s+__future__\s+import\s+\(*(.+)\)*latin-1c Csddl}|}|dd}z||}tdd|}tdd|}tdd|}xTt|D]F}d d | d  d D}x&|D]}t ||d} | r|| j O}qWqdWWd||X|S) zRParse the compiler flags by :mod:`__future__` from the given Python code. rNzimport\s*\([\r\n]+zimport (z ,\s*[\r\n]+z, z \\\s*[\r\n]+ cSsg|]}|dqS)z())strip).0xr r r }sz&parse_future_flags..r,) __future__rrreadrresubPYTHON_FUTURE_IMPORT_refinditerr splitgetattrZ compiler_flag) r"encodingr-r#flagsZbodyr$namesnameZfeaturer r rparse_future_flagsgs"    r9cCsddddddd}|dr0dg}|d d }n"|d rNdg}|d d }ng}xHttd |D]4\}}|d r|||qd|rd|t|qdWtd|d|t j d}|d k S)aExtended pathname pattern matching. This function is similar to what is provided by the ``fnmatch`` module in the Python standard library, but: * can match complete (relative or absolute) path names, and not just file names, and * also supports a convenience pattern ("**") to match files at any directory level. Examples: >>> pathmatch('**.py', 'bar.py') True >>> pathmatch('**.py', 'foo/bar/baz.py') True >>> pathmatch('**.py', 'templates/index.html') False >>> pathmatch('./foo/**.py', 'foo/bar/baz.py') True >>> pathmatch('./foo/**.py', 'bar/baz.py') False >>> pathmatch('^foo/**.py', 'foo/bar/baz.py') True >>> pathmatch('^foo/**.py', 'bar/baz.py') False >>> pathmatch('**/templates/*.html', 'templates/index.html') True >>> pathmatch('**/templates/*.html', 'templates/foo/bar.html') False :param pattern: the glob pattern :param filename: the path name of the file to match against z[^/]z[^/]/z[^/]+z[^/]+/z (?:.+/)*?z(?:.+/)*?[^/]+)?z?/*z*/z**/z**^rNz./z ([?*]+/?)$/) r enumerater/r3appendescaperjoinreplaceossep)patternfilenameZsymbolsZbufidxpartrr r r pathmatchs('   rLc@seZdZedZdS) TextWrapperz((\s+|(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))N)__name__ __module__ __qualname__r/compileZ wordsep_rer r r rrMsrMFr>cCst|||dd}||S)aSimple wrapper around the ``textwrap.wrap`` function in the standard library. This version does not wrap lines on hyphens in words. :param text: the text to wrap :param width: the maximum line width :param initial_indent: string that will be prepended to the first line of wrapped output :param subsequent_indent: string that will be prepended to all lines save the first of wrapped output F)widthinitial_indentsubsequent_indentZbreak_long_words)rMZwrap)textrSrTrUwrapperr r rwraptexts rXc@sBeZdZdZdddZddZddZd d Zd d Zd dZ dS)FixedOffsetTimezonez&Fixed offset in minutes east from UTC.NcCs&t|d|_|dkrd|}||_dS)N)Zminutesz Etc/GMT%+d)r_offsetzone)selfoffsetr8r r r__init__s zFixedOffsetTimezone.__init__cCs|jS)N)r[)r\r r r__str__szFixedOffsetTimezone.__str__cCsd|j|jfS)Nz)r[rZ)r\r r r__repr__szFixedOffsetTimezone.__repr__cCs|jS)N)rZ)r\dtr r r utcoffsetszFixedOffsetTimezone.utcoffsetcCs|jS)N)r[)r\rar r rtznameszFixedOffsetTimezone.tznamecCstS)N)ZERO)r\rar r rdstszFixedOffsetTimezone.dst)N) rNrOrP__doc__r^r_r`rbrcrer r r rrYs rY)r&)rRr>r>)'rfr collectionsZdatetimerrrFr/textwrapZ babel._compatrrZpytzZ_pytzZbabelrobjectZmissingrrQVERBOSErr%r1r9rLrMrX OrderedDictZodictrYZutcZUTCZLOCALTZZ get_localzoneZ STDOFFSETZ DSTOFFSETZDSTDIFFrdr r r r s:  2 A