+
    …rœi/;  ã                  óæ   € R t ^ RIHt ^ RIHtHtHtHt ^ RIH	t	 ^ RI
HtHtHtHtHt ]! RRR7      t ^ RIHt ^ R	IHtHt ^ R
IHt ^ RIHt ^ RIHtHt ^ RIHtHtH t H!t!H"t"H#t#  ! R R]$4      t%R# )zn
This module provides :class:`.PathSpec` which is an object-oriented interface
for pattern matching of files.
)Úannotations)Ú
CollectionÚIterableÚIteratorÚSequence)Úzip_longest)ÚCallableÚOptionalÚTypeVarÚUnionÚcastÚSelfÚPathSpec)Úbound)Úutil)Ú_BackendÚBackendNamesHint©Úmake_pathspec_backend)ÚPattern)ÚAnyStrÚ
deprecated)ÚCheckResultÚStrPathÚTStrPathÚ	TreeEntryÚ_is_iterableÚnormalize_filec                  ó\  € ] tR t^/tRtRRRR/R R lltR R ltR	 R
 ltR R ltR R lt	R(R R llt
R(R R lltR)R R llt]RRRR/R R ll4       t]R R l4       tR(RR/R R llltR(R R lltR(RR/R R llltR)RR/R  R! lllt]! R"4      R# R$ l4       tR)RR/R% R& llltR'tR# )*r   za
The :class:`PathSpec` class is a wrapper around a list of compiled
:class:`.Pattern` instances.
ÚbackendNÚ_test_backend_factoryc               ó(   € V ^8„  d   QhRRRRRRRR/# )	é   Úpatternsz+Union[Sequence[Pattern], Iterable[Pattern]]r   ú"Union[BackendNamesHint, str, None]r    ú1Optional[Callable[[Sequence[Pattern]], _Backend]]ÚreturnÚNone© )Úformats   "Ú3/usr/lib/python3/dist-packages/pathspec/pathspec.pyÚ__annotate__ÚPathSpec.__annotate__5   s3   € ÷ .ñ .à7ð.ð .ð	.ð
 Kð.ð ñ.ó    c               óØ   € \        V\        4      '       g   \        V4      pVf   Rp\        \        V4      pVe
   V! V4      pMV P                  W!4      pW@n         W n         Wn        R# )a  
Initializes the :class:`.PathSpec` instance.

*patterns* (:class:`~collections.abc.Sequence` or :class:`~collections.abc.Iterable`)
contains each compiled pattern (:class:`.Pattern`). If not a sequence, it
will be converted to a :class:`list`.

*backend* (:class:`str` or :data:`None`) is the pattern (regular expression)
matching backend to use. Default is :data:`None` for "best" to use the best
available backend. Priority of backends is: "re2", "hyperscan", "simple".
The "simple" backend is always available.
NÚbest)	Ú
isinstancer   Úlistr   r   Ú_make_backendÚ_backendÚ_backend_namer#   )Úselfr#   r   r    Úuse_backends   &&$$ r*   Ú__init__ÚPathSpec.__init__5   st   € ô& 
�Hœh×	'Ò	'Ü�8‹n€8à‚_Ø€7äÔ! 7Ó+€'ØÒ&Ù& xÓ0�;à×#Ñ# GÓ6€;à'„-ðð
 *1Ôðð &.„-ñr-   c               ó$   € V ^8„  d   QhRRRRRR/# ©r"   r5   r   Úotherr   r&   r(   )r)   s   "r*   r+   r,   e   s!   € ÷ ñ �4ð  ð ¨Tñ r-   c                óª   € \        V\        4      '       d9   V P                  V P                  VP                  ,           V P                  R7      # \
        # )zh
Combines the :attr:`self.patterns <.PathSpec.patterns>` patterns from two
:class:`PathSpec` instances.
)r   )r0   r   Ú	__class__r#   r4   ÚNotImplemented©r5   r;   s   &&r*   Ú__add__ÚPathSpec.__add__e   s=   € ô
 �”x× Ò Ø
�.‰.˜Ÿ™¨¯©Õ7À×ASÑASˆ.Ó
TÐTä
Ðr-   c               ó    € V ^8„  d   QhRRRR/# )r"   r;   Úobjectr&   Úboolr(   )r)   s   "r*   r+   r,   o   s   € ÷ 	ñ 	˜ð 	 Dñ 	r-   c                óâ   € \        V\        4      '       dU   \        V P                  VP                  4      p\        ;QJ d    R V 4       F  '       d   K   R# 	  R# ! R V 4       4      # \
        # )z‘
Tests the equality of this path-spec with *other* (:class:`PathSpec`) by
comparing their :attr:`self.patterns <.PathSpec.patterns>` attributes.
c              3  ó.   "  € T F  w  rW8H  x € K  	  R # 5i©Nr(   )Ú.0ÚaÚbs   &  r*   Ú	<genexpr>Ú"PathSpec.__eq__.<locals>.<genexpr>v   s   é € Ð1¡™˜ˆaŽf£ùs   ‚FT)r0   r   r   r#   Úallr>   )r5   r;   Úpaired_patternss   && r*   Ú__eq__ÚPathSpec.__eq__o   sT   € ô
 �”x× Ò Ü  §¡°·±Ó?€?ß
‹#Ñ1¡Ó1�#Œ#Ð1Š#Ð1ˆ#Ñ1¡Ó1Ó
1Ð1ä
Ðr-   c               ó$   € V ^8„  d   QhRRRRRR/# r:   r(   )r)   s   "r*   r+   r,   z   s!   € ÷ 
ñ 
�Dð 
 ð 
¨dñ 
r-   c                óÚ   € \        V\        4      '       dQ   V ;P                  VP                  ,          un        V P                  V P                  V P                  4      V n        V # \        # )zh
Adds the :attr:`self.patterns <.PathSpec.patterns>` from *other*
(:class:`PathSpec`) to this instance.
)r0   r   r#   r2   r4   r3   r>   r?   s   &&r*   Ú__iadd__ÚPathSpec.__iadd__z   sL   € ô
 �”x× Ò Ø‡=‚=�E—N‘NÕ"…=Ø×%Ñ% d×&8Ñ&8¸$¿-¹-ÓH€4„=Ø
€;ä
Ðr-   c               ó   € V ^8„  d   QhRR/# )r"   r&   Úintr(   )r)   s   "r*   r+   r,   †   s   € ÷ ñ �cñ r-   c                ó,   € \        V P                  4      # )zj
Returns the number of :attr:`self.patterns <.PathSpec.patterns>` this
path-spec contains (:class:`int`).
)Úlenr#   )r5   s   &r*   Ú__len__ÚPathSpec.__len__†   s   € ô
 
ˆT�]‰]Ó	Ðr-   c               ó$   € V ^8„  d   QhRRRRRR/# )r"   Úfiler   Ú
separatorsúOptional[Collection[str]]r&   zCheckResult[TStrPath]r(   )r)   s   "r*   r+   r,   �   s(   € ÷ +ñ +àð+ð (ð+ð ñ	+r-   c                ój   € \        W4      pV P                  P                  V4      w  rE\        WV4      # )a¡  
Check the files against this path-spec.

*file* (:class:`str` or :class:`os.PathLike`) is the file path to be matched
against :attr:`self.patterns <.PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize. See
:func:`.normalize_file` for more information.

Returns the file check result (:class:`.CheckResult`).
)r   r3   Ú
match_filer   )r5   r\   r]   Ú	norm_fileÚincludeÚindexs   &&&   r*   Ú
check_fileÚPathSpec.check_file�   s1   € ô" ˜TÓ.€)Ø—=‘=×+Ñ+¨IÓ6�.€'Ü	�T EÓ	*Ð*r-   c               ó$   € V ^8„  d   QhRRRRRR/# )r"   ÚfileszIterable[TStrPath]r]   r^   r&   zIterator[CheckResult[TStrPath]]r(   )r)   s   "r*   r+   r,   ¢   s(   € ÷ 0ñ 0à	ð0ð (ð0ð &ñ	0r-   c              #  óÎ   "  € \        V4      '       g   \        RV: R24      hV F9  p\        W24      pV P                  P	                  V4      w  rV\        W5V4      x € K;  	  R# 5i)aÿ  
Check the files against this path-spec.

*files* (:class:`~collections.abc.Iterable` of :class:`str` or
:class:`os.PathLike`) contains the file paths to be checked against
:attr:`self.patterns <.PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize. See
:func:`.normalize_file` for more information.

Returns an :class:`~collections.abc.Iterator` yielding each file check
result (:class:`.CheckResult`).
úfiles:ú is not an iterable.N)r   Ú	TypeErrorr   r3   r`   r   )r5   rg   r]   Ú	orig_filera   rb   rc   s   &&&    r*   Úcheck_filesÚPathSpec.check_files¢   s^   é € ô& 
�e×	Ò	Ü	�V˜E™9Ð$8Ð9Ó	:Ð:ã€iÜ˜iÓ4€9Ø—M‘M×,Ñ,¨YÓ7�>€7Ü	�Y¨Ó	/Ô/ó ùs   ‚A#A%c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r"   Úrootr   Úon_errorú#Optional[Callable[[OSError], None]]Úfollow_linksúOptional[bool]r&   zIterator[CheckResult[str]]r(   )r)   s   "r*   r+   r,   ½   s2   € ÷ %ñ %àð%ð 0ð%ð ð	%ð
 !ñ%r-   c              #  ót   "  € \         P                  ! WVR7      pV P                  V4       Rj  x€L
  R#  L5i)a¸  
Walks the specified root path for all files and checks them against this
path-spec.

*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
search for files.

*on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally
is the error handler for file-system exceptions. It will be called with the
exception (:exc:`OSError`). Reraise the exception to abort the walk. Default
is :data:`None` to ignore file-system exceptions.

*follow_links* (:class:`bool` or :data:`None`) optionally is whether to walk
symbolic links that resolve to directories. Default is :data:`None` for
:data:`True`.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns an :class:`~collections.abc.Iterator` yielding each file check
result (:class:`.CheckResult`).
©rq   rs   N)r   Úiter_tree_filesrm   )r5   rp   rq   rs   rg   s   &&&& r*   Úcheck_tree_filesÚPathSpec.check_tree_files½   s-   é € ô< ×
Ò
˜tÀ\Ô
R€%Ø×Ñ˜eÓ$×$Ô$ùs   ‚-8¯6°8c               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )r"   Úclsz
type[Self]Úpattern_factoryz'Union[str, Callable[[AnyStr], Pattern]]ÚlineszIterable[AnyStr]r   r$   r    r%   r&   r   r(   )r)   s   "r*   r+   r,   ß   sM   € ÷ &Uñ &UØð&Uà:ð&Uð 
ð&Uð
 .ð&Uð Kð&Uð ñ&Ur-   c               ó<  € \        V\        4      '       d   \        P                  ! V4      p\	        V4      '       g   \        RV: R24      h\        V4      '       g   \        RV: R24      hV Uu. uF  qU'       g   K  V! V4      NK  	  ppV ! WcVR7      # u upi )ad  
Compiles the pattern lines.

*pattern_factory* can be either the name of a registered pattern factory
(:class:`str`), or a :class:`~collections.abc.Callable` used to compile
patterns. It must accept an uncompiled pattern (:class:`str`) and return the
compiled pattern (:class:`.Pattern`).

*lines* (:class:`~collections.abc.Iterable`) yields each uncompiled pattern
(:class:`str`). This simply has to yield each line so that it can be a
:class:`io.TextIOBase` (e.g., from :func:`open` or :class:`io.StringIO`) or
the result from :meth:`str.splitlines`.

*backend* (:class:`str` or :data:`None`) is the pattern (or regular
expression) matching backend to use. Default is :data:`None` for "best" to
use the best available backend. Priority of backends is: "re2", "hyperscan",
"simple". The "simple" backend is always available.

Returns the :class:`PathSpec` instance.
zpattern_factory:z is not callable.zlines:rj   )r   r    )r0   Ústrr   Úlookup_patternÚcallablerk   r   )r{   r|   r}   r   r    Úliner#   s   &&&$$  r*   Ú
from_linesÚPathSpec.from_linesÞ   s”   € ô: �¤×%Ò%Ü×(Ò(¨Ó9€?ä	�/×	"Ò	"Ü	Ð% oÑ%8Ð8IÐJÓ	KÐKä	�e×	Ò	Ü	�V˜E™9Ð$8Ð9Ó	:Ð:á05Ó>±¨»Ô#‰o˜dÖ#±€(Ð>Ù	ˆXÐ>SÔ	TÐTùò ?s   Á3	BÂBc               ó$   € V ^8„  d   QhRRRRRR/# )r"   Únamer   r#   zSequence[Pattern]r&   r   r(   )r)   s   "r*   r+   r,     s&   € ÷ /ñ /Øð/àð/ð ñ/r-   c                ó   € \        W4      # )aD  
.. warning:: This method is not part of the public API. It is subject to
        change.

Create the backend for the patterns.

*name* (:class:`str`) is the name of the backend.

*patterns* (:class:`~collections.abc.Sequence` of :class:`.Pattern`)
contains the compiled patterns.

Returns the matcher (:class:`._Backend`).
r   )r†   r#   s   &&r*   r2   ÚPathSpec._make_backend  s   € ô$ 
˜tÓ	.Ð.r-   Únegatec               ó(   € V ^8„  d   QhRRRRRRRR/# )	r"   ÚentrieszIterable[TreeEntry]r]   r^   r‰   rt   r&   úIterator[TreeEntry]r(   )r)   s   "r*   r+   r,     s2   € ÷ $ñ $àð$ð (ð$ð
 ð$ð ñ$r-   c             #  ó  "  € \        V4      '       g   \        RV: R24      hV FS  p\        VP                  V4      pV P                  P                  V4      w  rgV'       d   V'       * pV'       g   KO  Vx € KU  	  R# 5i)aÄ  
Matches the entries to this path-spec.

*entries* (:class:`~collections.abc.Iterable` of :class:`.TreeEntry`)
contains the entries to be matched against :attr:`self.patterns <.PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize. See
:func:`.normalize_file` for more information.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns the matched entries (:class:`~collections.abc.Iterator` of
:class:`.TreeEntry`).
zentries:rj   N)r   rk   r   Úpathr3   r`   )r5   r‹   r]   r‰   Úentryra   rb   Ú_indexs   &&&$    r*   Úmatch_entriesÚPathSpec.match_entries  sk   é € ô2 
�g×	Ò	Ü	�X˜g™[Ð(<Ð=Ó	>Ð>ã€eÜ˜eŸj™j¨*Ó5€9Ø—]‘]×-Ñ-¨iÓ8�?€7çØŒk€Gç�gØ
„Kó ùs   ‚A.A?Á5
A?c               ó$   € V ^8„  d   QhRRRRRR/# )r"   r\   r   r]   r^   r&   rD   r(   )r)   s   "r*   r+   r,   A  s(   € ÷ ñ àðð (ðð ñ	r-   c                óh   € \        W4      pV P                  P                  V4      w  rE\        V4      # )a—  
Matches the file to this path-spec.

*file* (:class:`str` or :class:`os.PathLike`) is the file path to be matched
against :attr:`self.patterns <.PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`)
optionally contains the path separators to normalize. See
:func:`.normalize_file` for more information.

Returns :data:`True` if *file* matched; otherwise, :data:`False`.
)r   r3   r`   rD   )r5   r\   r]   ra   rb   r�   s   &&&   r*   r`   ÚPathSpec.match_fileA  s.   € ô" ˜TÓ.€)Ø—M‘M×,Ñ,¨YÓ7�/€'Ü	ˆg‹Ðr-   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r"   rg   zIterable[StrPath]r]   r^   r‰   rt   r&   zIterator[StrPath]r(   )r)   s   "r*   r+   r,   V  s2   € ÷ %ñ %à	ð%ð (ð%ð
 ð%ð ñ%r-   c             #  óì   "  € \        V4      '       g   \        RV: R24      hV FH  p\        WB4      pV P                  P	                  V4      w  rgV'       d   V'       * pV'       g   KD  Vx € KJ  	  R# 5i)aã  
Matches the files to this path-spec.

*files* (:class:`~collections.abc.Iterable` of :class:`str` or
:class:`os.PathLike`) contains the file paths to be matched against
:attr:`self.patterns <.PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize. See
:func:`.normalize_file` for more information.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns the matched files (:class:`~collections.abc.Iterator` of
:class:`str` or :class:`os.PathLike`).
ri   rj   N)r   rk   r   r3   r`   )r5   rg   r]   r‰   rl   ra   rb   r�   s   &&&$    r*   Úmatch_filesÚPathSpec.match_filesV  se   é € ô4 
�e×	Ò	Ü	�V˜E™9Ð$8Ð9Ó	:Ð:ã€iÜ˜iÓ4€9Ø—]‘]×-Ñ-¨iÓ8�?€7çØŒk€Gç�gØ
„Oó ùs   ‚A#A4Á*
A4c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r"   rp   r   rq   rr   rs   rt   r‰   r&   rŒ   r(   )r)   s   "r*   r+   r,   }  s<   € ÷ !8ñ !8àð!8ð 0ð!8ð ð	!8ð ð!8ð ñ!8r-   c             #  óv   "  € \         P                  ! WVR7      pV P                  WTR7       Rj  x€L
  R#  L5i)aš  
Walks the specified root path for all files and matches them to this
path-spec.

*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
search.

*on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally
is the error handler for file-system exceptions. It will be called with the
exception (:exc:`OSError`). Reraise the exception to abort the walk. Default
is :data:`None` to ignore file-system exceptions.

*follow_links* (:class:`bool` or :data:`None`) optionally is whether to walk
symbolic links that resolve to directories. Default is :data:`None` for
:data:`True`.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns the matched files (:class:`~collections.abc.Iterator` of
:class:`.TreeEntry`).
rv   ©r‰   N)r   Úiter_tree_entriesr‘   )r5   rp   rq   rs   r‰   r‹   s   &&&&$ r*   Úmatch_tree_entriesÚPathSpec.match_tree_entries}  s1   é € ô@ ×"Ò" 4ÈÔV€'Ø×Ñ ÐÓ7×7Ô7ùó   ‚.9°7±9zEPathSpec.match_tree() is deprecated. Use .match_tree_files() instead.c               ó   € V ^8„  d   QhRR/# )r"   r&   úIterator[str]r(   )r)   s   "r*   r+   r,   ¤  s   € ÷ ,ñ , mñ ,r-   c                ó&   € V P                   ! V/ VB # )z‹
.. version-deprecated:: 0.3.2
        This is an alias for the :meth:`self.match_tree_files <.PathSpec.match_tree_files>`
        method.
)Úmatch_tree_files)r5   ÚargsÚkws   &*,r*   Ú
match_treeÚPathSpec.match_tree¡  s   € ð 
×	Ò	 Ð	+¨Ñ	+Ð+r-   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r"   rp   r   rq   rr   rs   rt   r‰   r&   r¢   r(   )r)   s   "r*   r+   r,   ¬  s<   € ÷  4ñ  4àð 4ð 0ð 4ð ð	 4ð ð 4ð ñ 4r-   c             #  óv   "  € \         P                  ! WVR7      pV P                  WTR7       Rj  x€L
  R#  L5i)a�  
Walks the specified root path for all files and matches them to this
path-spec.

*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
search for files.

*on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally
is the error handler for file-system exceptions. It will be called with the
exception (:exc:`OSError`). Reraise the exception to abort the walk. Default
is :data:`None` to ignore file-system exceptions.

*follow_links* (:class:`bool` or :data:`None`) optionally is whether to walk
symbolic links that resolve to directories. Default is :data:`None` for
:data:`True`.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns the matched files (:class:`~collections.abc.Iterable` of :class:`str`).
rv   rœ   N)r   rw   r˜   )r5   rp   rq   rs   r‰   rg   s   &&&&$ r*   r¤   ÚPathSpec.match_tree_files¬  s0   é € ô> ×
Ò
˜tÀ\Ô
R€%Ø×Ñ˜eÐÓ3×3Ô3ùr    )r3   r4   r#   rG   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r7   r@   rO   rS   rY   rd   rm   rx   Úclassmethodrƒ   Ústaticmethodr2   r‘   r`   r˜   rž   r   r§   r¤   Ú__static_attributes__r(   r-   r*   r   r   /   sþ   † ñð
.ð 15ð	.ð
 NR÷.õ`õ	õ
õ÷+÷*0÷6%ðB ð&Uð
 15ð&Uð NRö&Uó ð&UðP ô/ó ð/ñ&$ð
  ÷$ð $÷Lñ*%ð
  ÷%ð %ñN!8ð  ÷!8ð !8ñH ØIóô,óð,ñ 4ð  ÷ 4ô  4r-   N)&r°   Ú
__future__r   Úcollections.abcr   r   r   r   Ú	itertoolsr   Útypingr   r	   r
   r   r   r   Úpathspecr   Úpathspec.backendr   r   Úpathspec._backends.aggr   Úpathspec.patternr   Úpathspec._typingr   r   Úpathspec.utilr   r   r   r   r   r   rC   r   r(   r-   r*   Ú<module>r¾      sl   ðñõ #÷ó õ
÷õ ñ ˆv˜ZÔ(€ðõ
 ÷õõ
÷÷÷ ô]4ˆvö ]4r-   