Files
ServerSync/lib/pathspec/__pycache__/pattern.cpython-314.pyc

123 lines
8.8 KiB
Plaintext
Raw Normal View History

2026-03-31 00:43:39 +03:00
+
k<><6B>i'<00><01><><00>Rt^RIHt^RIt^RIHtHt^RIHt^RI H
t
H t H t H t ^RIHtHtHt] !RRR 7t!R
R ]4t!R R]4t]!4!R R]44tR#)z8
This module provides the base definition for patterns.
)<01> annotationsN)<02>Iterable<6C>Iterator)<01> dataclass)<04>Any<6E>Optional<61>TypeVar<61>Union)<03>AnyStr<74>
deprecated<EFBFBD>override<64>RegexPatternSelf<6C> RegexPattern)<01>boundc<01>X<00>]tRt^tRtR tRRlt]!R4RRl4tRRlt R t
R
#) <0B>PatternzE
The :class:`Pattern` class is the abstract definition of a pattern.
c<01> <00>V^8<>dQhRRRR/#)<05><00>include<64>Optional[bool]<5D>return<72>None<6E>)<01>formats"<22>7/tmp/pip-target-9typod50/lib/python/pathspec/pattern.py<70> __annotate__<5F>Pattern.__annotate__'s<00><00><06><06>^<5E><06><04><06>c <0A><00>WnR#)z<>
Initializes the :class:`Pattern` instance.
*include* (:class:`bool` or :data:`None`) is whether the matched files
should be included (:data:`True`), excluded (:data:`False`), or is a
null-operation (:data:`None`).
N<EFBFBD>r)<02>selfrs&&r<00>__init__<5F>Pattern.__init__'s<00><00><19>,<2C>rzXPattern.match() is deprecated. Use Pattern.match_file() with a loop for similar results.c<01> <00>V^8<>dQhRRRR/#)r<00>filesz Iterable[str]rz Iterator[str]r)rs"rrr;s<00><00><0F><0F> <0A><0F>-<2D>rc# <0A>R"<00>VFpVPV4fKVx<00>K R#5i)a<>
.. version-deprecated:: 0.10.0
This method is no longer used. Use the :meth:`self.match_file <.Pattern.match_file>`
method with a loop for similar results.
Matches this pattern against the specified files.
*files* (:class:`~collections.abc.Iterable` of :class:`str`) contains each
file relative to the root directory.
Returns an :class:`~collections.abc.Iterable` yielding each matched file
path (:class:`str`).
N)<01>
match_file)r r$<00>files&& r<00>match<63> Pattern.match7s%<00><00><00>$<14>d<EFBFBD>
<EFBFBD>o<EFBFBD>o<EFBFBD>d<EFBFBD><1B>'<27>
<0E>J<EFBFBD><14>s<00>'<01>
'c<01> <00>V^8<>dQhRRRR/#)rr'<00>strrz Optional[Any]r)rs"rrrMs<00><00>
 <20>
 <20>C<EFBFBD>
 <20>M<EFBFBD>
 rc <0A>L<00>\RPVPR74h)z<>
Matches this pattern against the specified file.
*file* (:class:`str`) is the normalized file path to match against.
Returns the match result if *file* matched; otherwise, :data:`None`.
z?{cls.__module__}.{cls.__qualname__} must override match_file().)<01>cls)<03>NotImplementedErrorr<00> __class__)r r's&&rr&<00>Pattern.match_fileMs$<00><00> <1C>D<>
<EFBFBD>F<EFBFBD>t<EFBFBD>~<7E>~<7E>F<EFBFBD><1E> <20> rrN) <0B>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__<5F> __slots__r!r r(r&<00>__static_attributes__rrrrrs;<00><00><05>
<03><19><06>  <0A><15><04><0F> <04><0F>$
 <20>
 rrc<01>~a<00>]tRt^ZtRtR tR RV3RllltRRltRRlt] RR l4t
] R
R l4t R t V;t#)rz^
The :class:`RegexPattern` class is an implementation of a pattern using
regular expressions.
c<01>$<00>V^8<>dQhRRRRRR/#)r<00>patternzUnion[AnyStr, re.Pattern, None]rrrrr)rs"rr<00>RegexPattern.__annotate__fs(<00><00>9<06>9<06> *<2A>9<06> <1A>9<06> <0B> 9rc <0A><><<01>\V\\34'dCVeQRV: RV: R24hVPV4wr2Ve\P
!V4pMDVe\ VR4'dTpM+VfVeQRV: RV: R24hRpM\RV: R24h\\V`+V4Wn W0n R#) a
Initializes the :class:`RegexPattern` instance.
*pattern* (:class:`str`, :class:`bytes`, :class:`re.Pattern`, or
:data:`None`) is the pattern to compile into a regular expression.
*include* (:class:`bool` or :data:`None`) must be :data:`None` unless
*pattern* is a precompiled regular expression (:class:`re.Pattern`) in which
case it is whether matched files should be included (:data:`True`), excluded
(:data:`False`), or is a null operation (:data:`None`).
.. note:: Subclasses do not need to support the *include* parameter.
Nzinclude:z must be null when pattern:z is a string.r(z is null.zpattern:z& is not a string, re.Pattern, or None.) <0A>
isinstancer+<00>bytes<65>pattern_to_regex<65>re<72>compile<6C>hasattr<74> TypeError<6F>superrr!r:<00>regex)r r:rrEr/s&&& <20>rr!<00>RegexPattern.__init__fs<><00><><00>&<10><07>#<23>u<EFBFBD><1C>&<26>&<26>
<11>/<2F><05><0E>w<EFBFBD>k<EFBFBD>4<>W<EFBFBD>K<EFBFBD>}<7D>M<><05>/<2F><19>)<29>)<29>'<27>2<>><3E>5<EFBFBD><0E><19> <0E>J<EFBFBD>J<EFBFBD>u<EFBFBD> <1D>E<EFBFBD><45><0E><1A>w<EFBFBD>w<EFBFBD><07>8<>8<> <13>5<EFBFBD><0E><EFBFBD> <12>/<2F><05><0E>w<EFBFBD>k<EFBFBD>4<>W<EFBFBD>K<EFBFBD>y<EFBFBD>I<><05>/<2F> <10>5<EFBFBD>
<13>X<EFBFBD>g<EFBFBD>[<5B>(N<>O<> P<>P<><07> <0C>d<EFBFBD>$<24>W<EFBFBD>-<2D>29<32>,<2C><06>
&+<2B>*<2A>rc<01> <00>V^8<>dQhRRRR/#)rr r rr)rs"rrr;<00>s<00><00><0F><0F>$<24><0F>)9<>rc <0A>t<00>VPVPVP4pVPVnV#)zT
Performa a shallow copy of the pattern.
Returns the copy (:class:`RegexPattern`).
)r/rErr:<00>r <00>others& r<00>__copy__<5F>RegexPattern.__copy__<5F>s,<00><00> <0F>.<2E>.<2E><14><1A><1A>T<EFBFBD>\<5C>\<5C>
2<EFBFBD>%<25><16>,<2C>,<2C>%<25>-<2D> <0E>,rc<01> <00>V^8<>dQhRRRR/#)rrJrr<00>boolr)rs"rrr;<00>s<00><00> <19> <19><1C> <19>$<24> rc <0A><><00>\V\4'd;VPVP8H;'dVPVP8H#\#)z<>
Tests the equality of this regex pattern with *other* (:class:`RegexPattern`)
by comparing their :attr:`~Pattern.include` and :attr:`~RegexPattern.regex`
attributes.
)r=rrrE<00>NotImplementedrIs&&r<00>__eq__<5F>RegexPattern.__eq__<5F>s?<00><00> <10><05>|<7C>$<24>$<24>
<0E>,<2C>,<2C>%<25>-<2D>-<2D>
'<27>
E<EFBFBD>
E<EFBFBD>D<EFBFBD>J<EFBFBD>J<EFBFBD>%<25>+<2B>+<2B>,E<>E<>
<18>rc<01> <00>V^8<>dQhRRRR/#)rr'r
rzOptional[RegexMatchResult]r)rs"rrr;<00>s<00><00><0E><0E>F<EFBFBD><0E>'A<>rc <0A>v<00>VPe+VPPV4pVe \V4#R#)a
Matches this pattern against the specified file.
*file* (:class:`str` or :class:`bytes`) is the file path relative to the
root directory (e.g., "relative/path/to/file").
Returns the match result (:class:`.RegexMatchResult`) if *file* matched;
otherwise, :data:`None`.
N)rrE<00>search<63>RegexMatchResult)r r'r(s&& rr&<00>RegexPattern.match_file<6C>s6<00><00>
<EFBFBD>\<5C>\<5C><1D> <0F>:<3A>:<3A> <1C> <1C>T<EFBFBD> "<22>5<EFBFBD> <0B><17> <1B>E<EFBFBD> "<22>"<22> rc<01> <00>V^8<>dQhRRRR/#)rr:r
rz'tuple[Optional[AnyStr], Optional[bool]]r)rs"rrr;<00>s<00><00><17><17> <11><17>.<2E>rc <0A>
<00>VR3#)a<>
Convert the pattern into an uncompiled regular expression.
*pattern* (:class:`str` or :class:`bytes`) is the pattern to convert into a
regular expression.
Returns a :class:`tuple` containing:
- *pattern* (:class:`str`, :class:`bytes` or :data:`None`) is the
uncompiled regular expression .
- *include* (:class:`bool` or :data:`None`) is whether matched files
should be included (:data:`True`), excluded (:data:`False`), or is a
null-operation (:data:`None`).
.. note:: The default implementation simply returns *pattern* and
:data:`True`.
Tr)r-r:s&&rr?<00>RegexPattern.pattern_to_regex<65>s<00><00>.
<11>$<24><1D>r)r:rE)N)r1r2r3r4r5r6r!rKrQr r&<00> classmethodr?r7<00> __classcell__)r/s@rrrZsL<00><><00><05> <03><19>
9<06>9<06>v<0F> <19> <0B><0E> <0B><0E>"<0E><17><0E>rc<01>*<00>]tRt^<5E>t$RtRtR]R&RtR#)rVzn
The :class:`RegexMatchResult` data class is used to return information about
the matched regular expression.
r(zre.MatchrN)r()r1r2r3r4r5r6<00>__annotations__r7rrrrVrV<00>s<00><00><05> <03><19> <11><1F>rrV)r5<00>
__future__rr@<00>collections.abcrr<00> dataclassesr<00>typingrrrr <00>_typingr
r r r <00>objectrrrVrrr<00><module>res~<00><01><04>#<23> <09> <0B> <0C><08><08>  <0B> <0B>
<1B>-<2D>^<5E>D<><10><04>
: <20>f<EFBFBD>: <20>zE<17>7<EFBFBD>E<17>P <0B><1B><05>v<EFBFBD><05> <0A>r