Ë œýCçEk�ãó˜—dZddlmZmZmZmZmZmZmZm Z m Z m Z ddl m Z ddlmZddlmZmZddlmZedd ¬ «Z Gd „d e «Zy ) zV This module provides :class:`.GitIgnoreSpec` which replicates *.gitignore* behavior. é) ÚAnyStrÚCallableÚIterableÚOptionalÚTupleÚTypeÚTypeVarÚUnionÚcastÚoverloadé)ÚPathSpec)ÚPattern)ÚGitWildMatchPatternÚ _DIR_MARK)Ú _is_iterableÚSelfÚ GitIgnoreSpec)Úboundc ó`‡—eZdZdZdedefˆfd„ Zeede e de e e egeffdeede fd„««Zee dde e deede e e egefd fde fd „««Ze dde e deede e e egefd fde fˆfd „ «Zed eeeefd e deeeeeffd„«ZˆxZS)rzu The :class:`GitIgnoreSpec` class extends :class:`pathspec.pathspec.PathSpec` to replicate *.gitignore* behavior. ÚotherÚreturncóp•—t|t«rt‰|� |«St|t«ryt S)zÏ Tests the equality of this gitignore-spec with *other* (:class:`GitIgnoreSpec`) by comparing their :attr:`~pathspec.pattern.Pattern` attributes. A non-:class:`GitIgnoreSpec` will not compare equal. F)Ú isinstancerÚsuperÚ__eq__rÚNotImplemented)ÚselfrÚ __class__s €ú7/usr/lib/python3.12/site-packages/pathspec/gitignore.pyrzGitIgnoreSpec.__eq__)s1ø€ô �”}Ô%Ü ‰'‰.˜Ó ÐÜ�%œÔ"Ø ä ÐóÚclsÚpattern_factoryÚlinescó—y©N©)r"r#r$s r Ú from_lineszGitIgnoreSpec.from_lines7ó€ðr!Ncó—yr&r')r"r$r#s r r(zGitIgnoreSpec.from_lines@r)r!có¶•—|€t}n0t|ttf«s t |«rt |«r||}}t ‰|�||«}tt|«S)aÊ Compiles the pattern lines. *lines* (:class:`~collections.abc.Iterable`) yields each uncompiled pattern (:class:`str`). This simply has to yield each line so it can be a :class:`io.TextIOBase` (e.g., from :func:`open` or :class:`io.StringIO`) or the result from :meth:`str.splitlines`. *pattern_factory* can be :data:`None`, the name of a registered pattern factory (:class:`str`), or a :class:`~collections.abc.Callable` used to compile patterns. The callable must accept an uncompiled pattern (:class:`str`) and return the compiled pattern (:class:`pathspec.pattern.Pattern`). Default is :data:`None` for :class:`.GitWildMatchPattern`). Returns the :class:`GitIgnoreSpec` instance. ) rrÚstrÚbytesÚcallablerrr(r r)r"r$r#rrs €r r(zGitIgnoreSpec.from_linesIsRø€ð.ÐÜ(�?ä�5œ3¤˜,Ô'¬8°E¬?Ä È_Ô@]à! ?�E€?ä ‰Ñ ˜O¨UÓ 3€$Ü Œd�DÓ Ðr!ÚpatternsÚfilecó>—d}d}d}|D]�\}}|j€Œ|j|«}|€Œ'|jj«j t «}|rd} nd} |jr|r|j}|}| }Œz| |k\sŒ€|j}|}| }Œ‘||fS)aÖ Check the file against the patterns. .. NOTE:: Subclasses of :class:`~pathspec.pathspec.PathSpec` may override this method as an instance method. It does not have to be a static method. The signature for this method is subject to change. *patterns* (:class:`~collections.abc.Iterable`) yields each indexed pattern (:class:`tuple`) which contains the pattern index (:class:`int`) and actual pattern (:class:`~pathspec.pattern.Pattern`). *file* (:class:`str`) is the normalized file path to be matched against *patterns*. Returns a :class:`tuple` containing whether to include *file* (:class:`bool` or :data:`None`), and the index of the last matched pattern (:class:`int` or :data:`None`). Nrr é)ÚincludeÚ match_fileÚmatchÚ groupdictÚgetr) r/r0Ú out_includeÚ out_indexÚ out_priorityÚindexÚpatternr5Údir_markÚprioritys r Ú _match_filezGitIgnoreSpec._match_filejs³€ð.!%€+Ø!€)Ø€,Û �n€eˆWØ ‡o�oÑ!Ø × Ñ ˜tÓ $€EØ Ñð— ‘ ×%Ñ%Ó'×+Ñ+¬IÓ6€Xáà�hð€hà�Š™HØ—O‘O€kØ€iØ�lØ �lÓ "Ø—O‘O€kØ€iØ�lð/!ð2 �iÐ Ðr!r&)Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚobjectÚboolrr Ú classmethodrrr r,rrrrr(Ú staticmethodrÚintrrr?Ú __classcell__)rs@r rr#s“ø„ñð ˜ð  Dõ ð Ø ðØ ˆD�zðà˜˜h¨ x°Ð'8Ñ9Ð9Ñ:ðð �&Ñ ðð ò óó ðð Ø ðDHñØ ˆD�zðà �&Ñ ðð˜˜h¨ x°Ð'8Ñ9¸4Ð?Ñ@ðð ò óó ðððDHñØ ˆD�zðà �&Ñ ðð˜˜h¨ x°Ð'8Ñ9¸4Ð?Ñ@ðð ô óðð@ð2 Ø �U˜3Ð 3Ð3Ñ4Ñ 5ð2 à ð2 ð ˆH�T‰N˜H S™MÐ )Ñ*ò2 óô2 r!N)rCÚtypingrrrrrrr r r r Úpathspecrr<rÚpatterns.gitwildmatchrrÚutilrrrr'r!r ÚrNsNðñ÷  ÷  ÷  õ õ ÷ õñˆv˜_Ô-€ðô z �Hõz r!