Ë ù7òÿQ>pãó¶—dZddlZddlZddlZddlmZmZmZmZm Z m Z m Z mZmZGd„de«Z Gd„de «Zej$«Gd„d e««Zy) z8 This module provides the base definition for patterns. éN) ÚAnyÚAnyStrÚIterableÚIteratorÚMatchÚOptionalÚPatternÚTupleÚUnioncó\—eZdZdZdZdeeddfd„Zdee de e fd„Z d e dee fd „Z y) r zG The :class:`Pattern` class is the abstract definition of a pattern. ©ÚincluderÚreturnNcó—||_y)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`). Nr )Úselfrs ú5/usr/lib/python3.12/site-packages/pathspec/pattern.pyÚ__init__zPattern.__init__s€ð€$„,ðóÚfilesc#ó²K—tjdj|j¬«td¬«|D]}|j |«€Œ|–—Œy­w)aÖ DEPRECATED: This method is no longer used and has been replaced by :meth:`.match_file`. Use the :meth:`.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 (e.g., ``"relative/path/to/file"``). Returns an :class:`~collections.abc.Iterable` yielding each matched file path (:class:`str`). z�{cls.__module__}.{cls.__qualname__}.match() is deprecated. Use {cls.__module__}.{cls.__qualname__}.match_file() with a loop for similar results.©Úclsé)Ú stacklevelN)ÚwarningsÚwarnÚformatÚ __class__ÚDeprecationWarningÚ match_file)rrÚfiles rÚmatchz Pattern.match.sQèø€ô ‡-�-ð÷ �Fˆt�~‰~€FÓÔ 2¸qõ Bó €dØ ‡o�o�dÓÑ'Ø ƒJñùs ‚A AÁAr!cóL—tdj|j¬««‚)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().r)ÚNotImplementedErrorrr)rr!s rr zPattern.match_fileFs$€ô ØDß �Fˆt�~‰~€FÓó ð r)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__rÚboolrrÚstrrr"rr ©rrr r sW„ñð €ð˜X d™^ð°óð ˜ ™ ð¨(°3©-óð0  ˜Cð   H¨S¡Mô  rr c󔇗eZdZdZdZ ddeeedfdee ddfˆfd„ Z ddde fd „Z d e ded fd „Z ede dee e ffd „«ZˆxZS)Ú RegexPatternza The :class:`RegexPattern` class is an implementation of a pattern using regular expressions. )ÚpatternÚregexNr/rrcóR•—t|ttf«r<|�Jd|›d|›d�«‚|j|«\}}|�Ht j |«}n2|�t |d«r|}n!|€|�Jd|›d|›d�«‚td|›d�«‚tt|�+|«||_ |_ y) 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.) Ú isinstancer+ÚbytesÚpattern_to_regexÚreÚcompileÚhasattrÚ TypeErrorÚsuperr.rr/r0)rr/rr0rs €rrzRegexPattern.__init___säø€ô&�œ#œu˜Ô&Ø ˆ/ð؈wˆkÐ4°W°K¸}ÐMóˆ/ð×)Ñ)¨'Ó2�>€5ˆ'ðÐÜ �J‰J�uÓ �EàМw w°Ô8ð �5à€ð ˆ/ð؈wˆkÐ4°W°K¸yÐIóˆ/ô �X˜g˜[Ð(NÐOÓ PÐPäŒ �dÑ$ WÔ-à3:€$„,ðð "€$„*ðrÚothercó–—t|t«r4|j|jk(xr|j|jk(StS)z¯ Tests the equality of this regex pattern with *other* (:class:`RegexPattern`) by comparing their :attr:`~Pattern.include` and :attr:`~RegexPattern.regex` attributes. )r2r.rr0ÚNotImplemented)rr:s rÚ__eq__zRegexPattern.__eq__˜s9€ô �”|Ô$Ø �,‰,˜%Ÿ-™-Ñ 'Ò E¨D¯J©J¸%¿+¹+Ñ,EÐEä Ðrr!ÚRegexMatchResultcól—|j�(|jj|«}|� t|«Sy)a  Matches this pattern against the specified file. *file* (:class:`str`) contains each file relative to the root directory (e.g., "relative/path/to/file"). Returns the match result (:class:`.RegexMatchResult`) if *file* matched; otherwise, :data:`None`. N)rr0r"r>)rr!r"s rr zRegexPattern.match_file£s6€ð ‡\�\ÐØ �:‰:× Ñ ˜DÓ !€5Ø ÐÜ ˜EÓ "Ð"à rcó —|dfS)a¼ Convert the pattern into an uncompiled regular expression. *pattern* (:class:`str`) is the pattern to convert into a regular expression. Returns the uncompiled regular expression (:class:`str` or :data:`None`), and 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,)rr/s rr4zRegexPattern.pattern_to_regex´s€ð �$ˆÐr)N)r%r&r'r(r)r rÚ PatternHintrr*rr=r+r Ú classmethodr r4Ú __classcell__)rs@rr.r.Ss�ø„ñð €ð!ñ7à �˜ dÐ*Ñ +ð7ð �D‰>ð7ð õ 7ðr ˜ð ¨Dó ð˜Cð HÐ-?Ñ$@óð"ð Cð¨E°#°t°)Ñ,<òóôrr.có —eZdZUdZdZeed<y)r>zq The :class:`RegexMatchResult` data class is used to return information about the matched regular expression. )r"r"N)r%r&r'r(r)Ú MatchHintÚ__annotations__r,rrr>r>Æs…ñð €ð Óðrr>)r(Ú dataclassesr5rÚtypingrrrrrrErr rAr r Úobjectr.Ú dataclassr>r,rrÚrKsfðñóÛ Û÷ ÷ õ ô< ˆfô< ô~p�7ôpðf€×ÑÓô�vóóñr