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

405 lines
34 KiB
Plaintext
Raw Normal View History

2026-03-31 00:43:39 +03:00
+
k<><6B>i<EFBFBD>`<00><00>,<00>Rt^RIt^RIt^RIt^RIt^RIt^RIHtHtH t H
t
^RI H t ^RI HtHtHtHtHtHt^RIHt^RIHtHt]]]P4],3,t]!R]R7t]P:]P<3Uu.uF"pV'gK V]P:8wgK VNK$ upt/t R R
lt!R7R R llt"R7R Rllt#RRlt$RRlt%]!R4R8Rl4t&R8RRllt'RRlt(R8RRllt)RRlt*RRlt+RR lt,]!R!4R"R#l4t-R7R$R%llt.]!R&4R7R'R(ll4t/R7R)R*llt0!R+R,]14t2!R-R.]14t3] !R/R07!R1R2]],44t4!R3R4]54t6!R5R6]54t7R#uupi)9zC
This module provides utility methods for dealing with path-specs.
N)<04>
Collection<EFBFBD>Iterable<6C>Iterator<6F>Sequence)<01> dataclass)<06>Any<6E>Callable<6C>Generic<69>Optional<61>TypeVar<61>Union)<01>Pattern)<02>AnyStr<74>
deprecated<EFBFBD>TStrPath)<01>boundc<00>D<00>V^8<>dQhR\PR\/#)<03><00>path<74>return)<03>pathlib<69>Path<74>str)<01>formats"<22>4/tmp/pip-target-9typod50/lib/python/pathspec/util.py<70> __annotate__r9s<00><00><11><11><17><1C><1C><11>#<23><11>c<04>v<00>\V4pVP4'dV\P, pV#)a.
Appends the path separator to the path if the path is a directory. This can be
used to aid in distinguishing between directories and files on the file-system
by relying on the presence of a trailing path separator.
*path* (:class:`pathlib.Path`) is the path to use.
Returns the path (:class:`str`).
)r<00>is_dir<69>os<6F>sep)r<00>str_paths& r<00>append_dir_sepr"9s+<00><00> <10><04>I<EFBFBD><18><08>K<EFBFBD>K<EFBFBD>M<EFBFBD>M<EFBFBD>
<EFBFBD>b<EFBFBD>f<EFBFBD>f<EFBFBD><14>(<28><10>rc <00><><00>V^8<>dQhR\\\\3,,R\R\
\ ,R\\
\ ,\
\,3,/#)r<00>patterns<6E>file<6C> is_reversedr)r<00>tuple<6C>intr rr
<00>bool)rs"rrrJsT<00><00>) <20>) <20> <13>E<EFBFBD>#<23>w<EFBFBD>,<2C>'<27> (<28>) <20>
<EFBFBD>) <20><17>t<EFBFBD>n<EFBFBD>) <20> <0B>8<EFBFBD>D<EFBFBD>><3E>8<EFBFBD>C<EFBFBD>=<3D> (<28>)<29> ) rc<04><00>V'dAVF8wr4VPfKVPV4fK*VPV3u# R#RpRpVF8wr4VPfKVPV4fK*VPpTpK: WV3#)a<>
Check the file against the patterns.
*patterns* (:class:`~collections.abc.Iterable`) yields each indexed pattern
(:class:`tuple`) which contains the pattern index (:class:`int`) and actua
pattern (:class:`.Pattern`).
*file* (:class:`str`) is the normalized file path to be matched against
*patterns*.
*is_reversed* (:class:`bool` or :data:`None`) is whether the order of the
patterns has been reversed. Default is :data:`None` for :data:`False`.
Reversing the order of the patterns is an optimization.
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`).
N<EFBFBD>NN<4E><02>include<64>
match_file)r$r%r&<00>index<65>pattern<72> out_include<64> out_indexs&&& r<00>check_match_filer3Js<><00><00>.<10>!<21>n<EFBFBD>e<EFBFBD> <0A>o<EFBFBD>o<EFBFBD>!<21>g<EFBFBD>&8<>&8<><14>&><3E>&J<> <12>?<3F>?<3F>E<EFBFBD> !<21>!<21>!<21>
<14><13>!%<25>+<2B>!<21>)<29> <20>n<EFBFBD>e<EFBFBD> <0A>o<EFBFBD>o<EFBFBD>!<21>g<EFBFBD>&8<>&8<><14>&><3E>&J<><19>/<2F>/<2F>K<EFBFBD><15>I<EFBFBD>!<21>
<15> <1F>rc
<00><><00>V^8<>dQhR\\,R\\,R\\,R\
\R3,/#)rr$<00>files<65> all_matchesr<00> MatchDetail)rr rr
r)<00>dict)rs"rrrvsG<00><00>+<15>+<15> <13>G<EFBFBD> <1C>+<15><10><13> <0A>+<15><17>t<EFBFBD>n<EFBFBD>+<15>
<EFBFBD>#<23>}<7D>
<1C><1D> +rc<04><><00>\V\4'dTM
\V4p/pVF<>pVPfKVP V4pVP'dbVFYpWt9dCV'd$WG,P
P V4K4WTV,P
^&KK\V.4WG&K[ K<>VFpWHK K<> V#)a<>
Matches the files to the patterns, and returns which patterns matched the
files.
*patterns* (:class:`~collections.abc.Iterable` of :class:`.Pattern`) contains
the patterns to use.
*files* (:class:`~collections.abc.Iterable` of :class:`str`) contains the
normalized file paths to be matched against *patterns*.
*all_matches* (:class:`bool` or :data:`None`) is whether to return all matches
patterns (:data:`True`), or only the last matched pattern (:data:`False`).
Default is :data:`None` for :data:`False`.
Returns the matched files (:class:`dict`) which maps each matched file
(:class:`str`) to the patterns that matched in order (:class:`.MatchDetail`).
)<08>
isinstancer<00>listr-<00>matchr$<00>appendr7) r$r5r6<00> all_files<65> return_filesr0<00> result_files<65> result_filer%s &&& r<00>detailed_match_filesrBvs<><00><00>,!<21><15>
<EFBFBD>3<>3<>U<EFBFBD><14>e<EFBFBD><1B><19><12><1C><18>W<EFBFBD> <0C>_<EFBFBD>_<EFBFBD> <20><19>-<2D>-<2D> <09>*<2A><<3C> <0A>o<EFBFBD>o<EFBFBD>o<EFBFBD>#<23> <0B><13>#<23> <14><13> <20>)<29>)<29>0<>0<><17>9<>/6<>K<EFBFBD> <20>)<29>)<29>!<21>,<2C>"-<2D>w<EFBFBD>i<EFBFBD>"8<>l<EFBFBD><1F>$<24><1D><04> <15> <1B><1D>!<19>& <15>rc<00>~<00>V^8<>dQhR\\,R\\\\3,,/#)rr$r)rr r;r'r()rs"rrr<00>s/<00><00><03><03> <13>G<EFBFBD> <1C><03> <09>%<25><03>W<EFBFBD> <0C>
<1D><1E>rc<04>n<00>\V4UUu.uFwrVPfKW3NK upp#uuppi)a
Filters out null-patterns.
*patterns* (:class:`~collections.abc.Iterable` of :class:`.Pattern`) contains
the patterns.
Returns a :class:`list` containing each indexed pattern (:class:`tuple`) which
contains the pattern index (:class:`int`) and the actual pattern
(:class:`.Pattern`).
)<02> enumerater-)r$<00>__index<65>__pats& r<00>_filter_check_patternsrH<00>s<<00><00>"<22>(<28>+<2B> <03>+<2B>n<EFBFBD>g<EFBFBD>
<EFBFBD>]<5D>]<5D><13>7<EFBFBD><12>+<2B> <03><03><> s<00>1<06>1c<00>0<00>V^8<>dQhR\R\/#)r<00>valuer)rr))rs"rrr<00>s<00><00>L<01>L<01><03>L<01><04>Lrc<04>h<00>\V\4;'d\V\\34'*#)z<>
Check whether the value is an iterable (excludes strings).
*value* is the value to check,
Returns whether *value* is an iterable (:class:`bool`).
)r:rr<00>bytes)rJs&r<00> _is_iterablerM<00>s'<00><00> <13>5<EFBFBD>(<28>#<23>K<>K<>J<EFBFBD>u<EFBFBD>s<EFBFBD>E<EFBFBD>l<EFBFBD>,K<>(K<>KrzGpathspec.util.iter_tree() is deprecated. Use iter_tree_files() instead.c<04><00>\WVR7#)zd
.. version-deprecated:: 0.10.0
This is an alias for the :func:`.iter_tree_files` function.
)<02>on_error<6F> follow_links)<01>iter_tree_files<65><03>rootrOrPs&&&r<00> iter_treerT<00>s<00><00> <18><04>l<EFBFBD>K<>Krc <00><><00>V^8<>dQhR\R\\\.R3,,R\\,R\
R,/#)rrSrONrPr<00> TreeEntry)<06>StrPathr
r<00>OSErrorr)r)rs"rrr<00>sO<00><00>[<01>[<01><0E>[<01> <13>H<EFBFBD>g<EFBFBD>Y<EFBFBD><04>_<EFBFBD>-<2D> .<2E>[<01><18><04>~<7E>[<01><0E>k<EFBFBD><1A> [rc#<04><>"<00>Ve"\V4'g\RV: R24hVfRp\\PP V4R/W4Rjx<01>L
R#L5i)a
Walks the specified directory for all files and directories.
*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`.
Raises :exc:`.RecursionError` if recursion is detected.
Returns an :class:`~collections.abc.Iterator` yielding each file or directory
entry (:class:`.TreeEntry`) relative to *root*.
N<EFBFBD> on_error:<3A> is not callable.T<>)<06>callable<6C> TypeError<6F>_iter_tree_entries_nextrr<00>abspathrRs&&&r<00>iter_tree_entriesra<00>sX<00><00><00>0 <0A><18><18>(<28>!3<>!3<><11>I<EFBFBD>h<EFBFBD>\<5C>):<3A>;<3B><<3C><<3C><10><18><15>,<2C> #<23>B<EFBFBD>G<EFBFBD>G<EFBFBD>O<EFBFBD>O<EFBFBD>D<EFBFBD>$9<>2<EFBFBD>r<EFBFBD>8<EFBFBD> Z<>Z<>Z<><5A><00>AA%<01>A#<04>A%c <00><><00>V^8<>dQhR\R\R\\\3,R\\.R3,R\R\
R,/#) r<00> root_full<6C>dir_rel<65>memorONrPrrV<00>rr8rrXr)r)rs"rrr<00>sd<00><00>L<14>L<14> <0F>L<14>
<0A>L<14> <0C>C<EFBFBD><13>H<EFBFBD>~<7E>L<14> <14>W<EFBFBD>I<EFBFBD>t<EFBFBD>O<EFBFBD> $<24> L<14>
<14> L<14> <0E>k<EFBFBD><1A> Lrc
#<04><>"<00>\PPW4p\PPV4pWb9dWV&M\ WbV,VR7h\P
!V4;_uu_4pVF<>p\PPWP 4p VPRR7p
TP4'dTP4p MT
p TPTR7'd1\TP Y<>T 4x<00>\Y Y#T4Rjx<01>L
K<>TP4'gTP4'gK<>\TP Y<>T 4x<00>K<> RRR4W&R# \dp Te T!T 4Rp ? EK&Rp ? ii;i \dp Te T!T 4Rp ? EKLRp ? ii;iL<> +'giLb;i5i)ad
Scan the directory for all descendant files.
*root_full* (:class:`str`) the absolute path to the root directory.
*dir_rel* (:class:`str`) the path to the directory to scan relative to
*root_full*.
*memo* (:class:`dict`) keeps track of ancestor directories encountered. Maps
each ancestor real path (:class:`str`) to relative path (:class:`str`).
*on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally is
the error handler for file-system exceptions.
*follow_links* (:class:`bool`) is whether to walk symbolic links that resolve
to directories.
Yields each entry (:class:`.TreeEntry`).
<EFBFBD><03> real_path<74>
first_path<EFBFBD> second_pathF<68><01>follow_symlinksN)rr<00>join<69>realpath<74>RecursionError<6F>scandir<69>name<6D>statrX<00>
is_symlinkrrVr_<00>is_file) rdrerfrOrP<00>dir_full<6C>dir_real<61> scan_iter<65>node_ent<6E>node_rel<65>
node_lstat<EFBFBD>e<> node_stats &&&&& rr_r_<00>s<><00><00><00>4 <0F>G<EFBFBD>G<EFBFBD>L<EFBFBD>L<EFBFBD><19> ,<2C><18> <0E>G<EFBFBD>G<EFBFBD> <1C> <1C>X<EFBFBD> &<26><18> <0A><18><1A>x<EFBFBD>.<2E><16><18>8<EFBFBD>n<EFBFBD>RY<52>Z<>Z<><08>j<EFBFBD>j<EFBFBD><18><1A><1A>i<EFBFBD><1B>h<EFBFBD><10>g<EFBFBD>g<EFBFBD>l<EFBFBD>l<EFBFBD>7<EFBFBD>M<EFBFBD>M<EFBFBD>2<>8<EFBFBD> <0A><19><1D><1D>u<EFBFBD><1D>5<>J<EFBFBD> <0F><19><19><1B><1B><0E><19><1D><1D><1F>Y<EFBFBD> <1B>I<EFBFBD><0E>o<EFBFBD>o<EFBFBD>l<EFBFBD>o<EFBFBD>3<>3<> <14>H<EFBFBD>M<EFBFBD>M<EFBFBD>8<EFBFBD><19>
C<EFBFBD>C<>&<26>y<EFBFBD>D<EFBFBD>L<EFBFBD>Y<>Y<>Y<><10><18><18><1A><1A>h<EFBFBD>1<>1<>3<>3<>
<13>H<EFBFBD>M<EFBFBD>M<EFBFBD>8<EFBFBD><19>
C<EFBFBD>C<>?<1C><1B>P
<EFBFBD>^<5E><>A <12> <0A><0F><1B> <0A>a<EFBFBD>[<5B> <0C><> <0A><> <13><0E><10><1C><0E>q<EFBFBD>k<EFBFBD> <0A><><0E><>Z<01>;<1B><1A>s<EFBFBD><00>A<G*<01>>/G<05>.F <06>G<05>F/<06>'G<05>)G<05>+G
<EFBFBD>,G<05>G<05> G<05>= G*<01> F, <09> F' <09> G<05>'F, <09>,G<05>/ G <09>: G <09>G<05> G <09>G<05> G' <09>"G*c <00><><00>V^8<>dQhR\R\\\.R3,,R\\,R\
\ ,/#)rrSrONrPr)rWr
rrXr)rr)rs"rrr>sN<00><00>Y<01>Y<01><0E>Y<01> <13>H<EFBFBD>g<EFBFBD>Y<EFBFBD><04>_<EFBFBD>-<2D> .<2E>Y<01><18><04>~<7E>Y<01><0E>c<EFBFBD>]<5D> Yrc#<04><>"<00>Ve"\V4'g\RV: R24hVfRp\\PP V4R/W4Rjx<01>L
R#L5i)a<>
Walks the specified directory for all files.
*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`.
Raises :exc:`.RecursionError` if recursion is detected.
Returns an :class:`~collections.abc.Iterator` yielding the path to each file
(:class:`str`) relative to *root*.
NrZr[Tr\)r]r^<00>_iter_tree_files_nextrrr`rRs&&&rrQrQ>sX<00><00><00>2 <0A><18><18>(<28>!3<>!3<><11>I<EFBFBD>h<EFBFBD>\<5C>):<3A>;<3B><<3C><<3C><10><18><15>,<2C> !<21>"<22>'<27>'<27>/<2F>/<2F>$<24>"7<><12>R<EFBFBD><18> X<>X<>X<>rbc <00><><00>V^8<>dQhR\R\R\\\3,R\\.R3,R\R\
\,/#)rrdrerfrONrPrrg)rs"rrr`s[<00><00>;<14>;<14> <0F>;<14>
<0A>;<14> <0C>C<EFBFBD><13>H<EFBFBD>~<7E>;<14> <14>W<EFBFBD>I<EFBFBD>t<EFBFBD>O<EFBFBD> $<24> ;<14>
<14> ;<14> <0E>c<EFBFBD>]<5D> ;rc
#<04><>"<00>\PPW4p\PPV4pWb9dWV&M\ WbV,VR7h\P
!V4;_uu_4pVF<>p\PPWP 4p VPVR7'd\W W#V4Rjx<01>L
K[VP4'dV x<00>KwV'dK<>VP4'gK<>V x<00>K<> RRR4W&R#LX +'giL;i5i)aa
Scan the directory for all descendant files.
*root_full* (:class:`str`) the absolute path to the root directory.
*dir_rel* (:class:`str`) the path to the directory to scan relative to
*root_full*.
*memo* (:class:`dict`) keeps track of ancestor directories encountered. Maps
each ancestor real path (:class:`str`) to relative path (:class:`str`).
*on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally is
the error handler for file-system exceptions.
*follow_links* (:class:`bool`) is whether to walk symbolic links that resolve
to directories.
Yields each file path (:class:`str`).
rirmN) rrrorprqrrrsrr<>rvru)
rdrerfrOrPrwrxryrzr{s
&&&&& rr<>r<>`s<><00><00><00>4 <0F>G<EFBFBD>G<EFBFBD>L<EFBFBD>L<EFBFBD><19> ,<2C><18> <0E>G<EFBFBD>G<EFBFBD> <1C> <1C>X<EFBFBD> &<26><18> <0A><18><1A>x<EFBFBD>.<2E><16><18>8<EFBFBD>n<EFBFBD>RY<52>Z<>Z<><08>j<EFBFBD>j<EFBFBD><18><1A><1A>i<EFBFBD><1B>h<EFBFBD><10>g<EFBFBD>g<EFBFBD>l<EFBFBD>l<EFBFBD>7<EFBFBD>M<EFBFBD>M<EFBFBD>2<>8<EFBFBD><0E>o<EFBFBD>o<EFBFBD>l<EFBFBD>o<EFBFBD>3<>3<>%<25>Y<EFBFBD>$<24>,<2C>W<>W<>W<><10><18><18><1A><1A>
<12>N<EFBFBD> <18>L<EFBFBD>X<EFBFBD>0<>0<>2<>2<>
<12>N<EFBFBD><1C><1B>.
<EFBFBD>^<5E>X<01><1B><1A>sC<00>A<E<01>>AD0<05>D.
<EFBFBD>D0<05>2 D0<05>D0<05>D0<05>" E<01>.D0<05>0 E <09>;Ec<00>T<00>V^8<>dQhR\R\\.\3,/#)rrsr<00>rrrr )rs"rrr<00>s&<00><00> #<23> #<23><13> #<23><18>6<EFBFBD>(<28>G<EFBFBD>*;<3B>!<<3C> #rc<04><00>\V,#)z<>
Lookups a registered pattern factory by name.
*name* (:class:`str`) is the name of the pattern factory.
Returns the registered pattern factory (:class:`~collections.abc.Callable`).
If no pattern factory is registered, raises :exc:`KeyError`.
)<01>_registered_patterns)rss&r<00>lookup_patternr<6E><00>s<00><00> <1D>T<EFBFBD>"<22>"rc<00>R<00>V^8<>dQhR\\,R\R\/#)rr$r%r)rr rr))rs"rrr<00>s&<00><00><10><10><18>'<27>*<2A><10>#<23><10>$<24>rc<04>~<00>RpVF4pVPfKVPV4fK(VPpK6 V#)a
Matches the file to the patterns.
*patterns* (:class:`~collections.abc.Iterable` of :class:`.Pattern`) contains
the patterns to use.
*file* (:class:`str`) is the normalized file path to be matched against
*patterns*.
Returns :data:`True` if *file* matched; otherwise, :data:`False`.
Fr,)r$r%<00>matchedr0s&& rr.r.<00>s=<00><00> <11><17><18>W<EFBFBD> <0C>_<EFBFBD>_<EFBFBD> <20>W<EFBFBD>%7<>%7<><04>%=<3D>%I<> <14>_<EFBFBD>_<EFBFBD>7<EFBFBD><19> <10>rz[pathspec.util.match_files() is deprecated. Use match_file() with a loop for better results.c<00>~<00>V^8<>dQhR\\,R\\,R\\,/#)rr$r5r)rr r<00>set)rs"rrr<00>s3<00><00><15><15> <13>G<EFBFBD> <1C><15><10><13> <0A><15> <09><13>X<EFBFBD>rc<04><><00>VUu.uFq"PfKVNK pp\4pVF'p\W54'gKVPV4K) V#uupi)a<>
.. version-deprecated:: 0.10.0
This function is no longer used. Use the :func:`.match_file` function with a
loop for better results.
Matches the files to the patterns.
*patterns* (:class:`~collections.abc.Iterable` of :class:`.Pattern`) contains
the patterns to use.
*files* (:class:`~collections.abc.Iterable` of :class:`str`) contains the
normalized file paths to be matched against *patterns*.
Returns the matched files (:class:`set` of :class:`str`).
)r-r<>r.<00>add)r$r5rG<00> use_patternsr?r%s&& r<00> match_filesr<73><00>sV<00><00>.%-<2D>J<>H<EFBFBD>5<EFBFBD> <0A> <0A><15><15>H<EFBFBD><1C>J<><13><05><1C> <12>T<EFBFBD><0F> <0C>#<23>#<23><0F><13><13>D<EFBFBD><19><13> <15><14><>Ks
<00>A<04>Ac<00>h<00>V^8<>dQhR\R\\\,,R\/#)rr%<00>
separatorsr)rWr
rr)rs"rrr<00>s/<00><00>%<12>%<12><0E>%<12> <15>j<EFBFBD><13>o<EFBFBD> &<26>%<12> <09>%rc<04><00>Vf\p\P!V4pVF#pVPV\P
4pK% VP R4'd VR,pV#VP R4'd
VR,pV#)aw
Normalizes the file path to use the POSIX path separator (i.e., ``"/"``), and
make the paths relative (remove leading ``"/"``).
*file* (:class:`str` or :class:`os.PathLike`) is the file path.
*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize. This does
not need to include the POSIX path separator (``"/"``), but including it will
not affect the results. Default is ``None`` for :data:`.NORMALIZE_PATH_SEPS`.
To prevent normalization, pass an empty container (e.g., an empty tuple
``()``).
Returns the normalized file path (:class:`str`).
<EFBFBD>/:<3A>NNz./:rNN)<07>NORMALIZE_PATH_SEPSr<00>fspath<74>replace<63> posixpathr <00>
startswith)r%r<><00> norm_filer s&& r<00>normalize_filer<65><00>s<><00><00>(<0F><16>"<22>*<2A><15>)<29>)<29>D<EFBFBD>/<2F><19> <16>S<EFBFBD><17><1F><1F><03>Y<EFBFBD>]<5D>]<5D>3<>)<29> <17><0E><18><18><13><1D><1D><17><02>m<EFBFBD>)<29> <12><11> <10><1A><1A>4<EFBFBD> <20> <20><17><02>m<EFBFBD>)<29><11>rzcpathspec.util.normalize_files() is deprecated. Use normalize_file() with a loop for better results.c <00><><00>V^8<>dQhR\\,R\\\,,R\
\\ \,3,/#)rr5r<>r)rrWr
rrr8r;)rs"rrr sB<00><00><13><13><10><17><19><13> <15>j<EFBFBD><13>o<EFBFBD> &<26><13>
<EFBFBD>#<23>t<EFBFBD>G<EFBFBD>}<7D>
<1C><1D>rc<04>|<00>/pVF3p\W1R7pWB9dW$,PV4K.V.W$&K5 V#)a<>
.. version-deprecated:: 0.10.0
This function is no longer used. Use the :func:`.normalize_file` function
with a loop for better results.
Normalizes the file paths to use the POSIX path separator.
*files* (:class:`~collections.abc.Iterable` of :class:`str` or
:class:`os.PathLike`) contains the file paths to be normalized.
*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 a :class:`dict` mapping each normalized file path (:class:`str`) to
the original file paths (:class:`list` of :class:`str` or
:class:`os.PathLike`).
)r<>)r<>r=)r5r<><00>
norm_filesrr<>s&& r<00>normalize_filesr<73>sF<00><00>4<11><1A> <12>T<EFBFBD><1C>T<EFBFBD>9<>)<29><0E><1C> <0A><18><1F><1F><04>%<25> <20>6<EFBFBD>:<3A><18> <13> <13>rc<00>z<00>V^8<>dQhR\R\\.\3,R\\
,RR/#)rrs<00>pattern_factory<72>overriderN)rrrr r
r))rs"rrr,s@<00><00>.<2E>.<2E>
<EFBFBD>.<2E><1A>F<EFBFBD>8<EFBFBD>W<EFBFBD>,<2C>-<2D>.<2E> <14>D<EFBFBD>><3E>.<2E>
<EFBFBD> .rc<04><><00>\V\4'g\RV: R24h\V4'g\RV: R24hV\9d V'g\ V\V,4hV\V&R#)a;
Registers the specified pattern factory.
*name* (:class:`str`) is the name to register the pattern factory under.
*pattern_factory* (:class:`~collections.abc.Callable`) is used to compile
patterns. It must accept an uncompiled pattern (:class:`str`) and return the
compiled pattern (:class:`.Pattern`).
*override* (:class:`bool` or :data:`None`) optionally is whether to allow
overriding an already registered pattern under the same name (:data:`True`),
instead of raising an :exc:`.AlreadyRegisteredError` (:data:`False`). Default
is :data:`None` for :data:`False`.
zname:z is not a string.zpattern_factory:r[N)r:rr^r]r<><00>AlreadyRegisteredError)rsr<>r<>s&&&r<00>register_patternr<6E>,sq<00><00>& <13>4<EFBFBD><13><1D><1D><11>E<EFBFBD>$<24><18>!2<>3<>4<>4<><10><1F>!<21>!<21><11>$<24>_<EFBFBD>$7<>7H<37>I<>J<>J<><08> <20> <20><18><1E>t<EFBFBD>%9<>$<24>%?<3F>@<40>@<40>-<2D><15>d<EFBFBD>rc<00><>aa<01>]tRtRtoRtV3RlV3Rllt]V3RlRl4t]V3RlRl4t]V3R lR
l4t R t
Vt V;t #) r<>iKzy
The :exc:`AlreadyRegisteredError` exception is raised when a pattern factory
is registered under a name already in use.
c<00>B<<01>V^8<>dQhRS[RS[S[.S[3,RR/#)rrsr<>rNr<4E>)r<00> __classdict__s"<22>rr<00>#AlreadyRegisteredError.__annotate__Qs5<00><><00> *<2A> *<2A> <0B> *<2A><1C>V<EFBFBD>H<EFBFBD>g<EFBFBD>-<2D>.<2E> *<2A> <0B> *rc <0C>&<<01>\SV`W4R#)z<>
Initializes the :exc:`AlreadyRegisteredError` instance.
*name* (:class:`str`) is the name of the registered pattern.
*pattern_factory* (:class:`~collections.abc.Callable`) is the registered
pattern factory.
N<EFBFBD><02>super<65>__init__)<04>selfrsr<><00> __class__s&&&<26>rr<><00>AlreadyRegisteredError.__init__Qs<00><><00><08>'<27><12>4<EFBFBD>)rc<00> <<01>V^8<>dQhRS[/#<00>rr<00>r)rr<>s"<22>rrr<>a<00><00><><00><04><04>c<EFBFBD>rc <0C>><00>VP: RVP: R2#)<03>0
*message* (:class:`str`) is the error message.
z+ is already registered for pattern factory=<3D>.)rsr<><00>r<>s&r<00>message<67>AlreadyRegisteredError.message`s(<00><00>  <0B>i<EFBFBD>i<EFBFBD>]<5D>=<3D>
<EFBFBD><1A><1A><1D>Q<EFBFBD> <20>rc<00> <<01>V^8<>dQhRS[/#r<>r<>)rr<>s"<22>rrr<>ks<00><><00><16><16>3<EFBFBD>rc <0C>(<00>VP^,#)z>
*name* (:class:`str`) is the name of the registered pattern.
<EFBFBD><01>argsr<73>s&rrs<00>AlreadyRegisteredError.namejs<00><00>
<0E><19><19>1<EFBFBD><1C>rc<00>8<<01>V^8<>dQhRS[S[.S[3,/#r<>)rrr )rr<>s"<22>rrr<>rs <00><><00><16><16>h<EFBFBD><06>x<EFBFBD><17>'8<>9<>rc <0C>(<00>VP^,#)z[
*pattern_factory* (:class:`~collections.abc.Callable`) is the registered
pattern factory.
r<EFBFBD>r<>s&rr<><00>&AlreadyRegisteredError.pattern_factoryq<00><00><00>
<0E><19><19>1<EFBFBD><1C>r<00>) <0A>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__r<5F><00>propertyr<79>rsr<><00>__static_attributes__<5F>__classdictcell__<5F> __classcell__<5F>r<>r<>s@@rr<>r<>KsU<00><><00><00><05>
*<2A> *<2A> <0B><04> <0B><04> <0B><16> <0B><16>  <0B><16> <0B><16>rr<>c<00><>aa<01>]tRtRtoRtV3RlV3Rllt]V3RlRl4t]V3RlRl4t]V3R lR
l4t ]V3R lR l4t
R t Vt V;t #)rqizzK
The :exc:`RecursionError` exception is raised when recursion is detected.
c<00>0<<01>V^8<>dQhRS[RS[RS[RR/#)rrjrkrlrNr<4E>)rr<>s"<22>rr<00>RecursionError.__annotate__s3<00><><00>7<>7<> <10>7<><12>7<><13> 7<>
 <0B> 7rc <0C>(<<01>\SV`WV4R#)a
Initializes the :exc:`RecursionError` instance.
*real_path* (:class:`str`) is the real path that recursion was encountered
on.
*first_path* (:class:`str`) is the first path encountered for *real_path*.
*second_path* (:class:`str`) is the second path encountered for *real_path*.
Nr<EFBFBD>)r<>rjrkrlr<>s&&&&<26>rr<><00>RecursionError.__init__s<00><><00> <08>'<27><12>9<EFBFBD>+<2B>6rc<00> <<01>V^8<>dQhRS[/#r<>r<>)rr<>s"<22>rrr<><00>s<00><><00><16><16><13>rc <0C>(<00>VP^,#)zr
*first_path* (:class:`str`) is the first path encountered for
:attr:`self.real_path <RecursionError.real_path>`.
r<EFBFBD>r<>s&rrk<00>RecursionError.first_path<74>r<>rc<00> <<01>V^8<>dQhRS[/#r<>r<>)rr<>s"<22>rrr<><00>r<>rc <0C>\<00>RVP: RVP: RVP: R2#)r<>z
Real path z was encountered at z
and then r<>rir<>s&rr<><00>RecursionError.message<67>s:<00><00> <10><04><0E><0E>!<21>!5<>d<EFBFBD>o<EFBFBD>o<EFBFBD>5H<35>I<0F><13><1F><1F>"<22>!<21>%<25>rc<00> <<01>V^8<>dQhRS[/#r<>r<>)rr<>s"<22>rrr<><00>s<00><><00><16><16><03>rc <0C>(<00>VP^,#)zP
*real_path* (:class:`str`) is the real path that recursion was
encountered on.
r<EFBFBD>r<>s&rrj<00>RecursionError.real_path<74>r<>rc<00> <<01>V^8<>dQhRS[/#r<>r<>)rr<>s"<22>rrr<><00>s<00><><00><16><16>#<23>rc <0C>(<00>VP^,#)zt
*second_path* (:class:`str`) is the second path encountered for
:attr:`self.real_path <RecursionError.real_path>`.
r<EFBFBD>r<>s&rrl<00>RecursionError.second_path<74>r<>rr<>)r<>r<>r<>r<>r<>r<>r<>rkr<>rjrlr<>r<>r<>r<>s@@rrqrqzsi<00><><00><00><05>7<>7<>$ <0B><16> <0B><16> <0B><04> <0B><04> <0B><16> <0B><16> <0B><16> <0B><16>rrqT)<01>frozenc<00>:a<00>]tRtRtoRtRtV3RltRtVtR#)<07> CheckResulti<74>zb
The :class:`CheckResult` class contains information about the file and which
pattern matched it.
c<00>^<<01>V^8<>dQh/S[;R&S[S[,;R&S[S[,;R&#)rr%r-r/)rr
r)r()rr<>s"<22>rr<00>CheckResult.__annotate__<5F>s3<00><><00><00><10><1E><01>& <13>4<EFBFBD>.<2E><18>'<01>2 <11><13> <0A><15>3rr<>N)r%r-r/) r<>r<>r<>r<>r<><00> __slots__<5F>__annotate_func__r<5F>r<><00>r<>s@rr<>r<><00>s'<00><><00><00><05> <03><19><05>
<05> <05>5<01>rr<>c<00>:a<00>]tRtRtoRtRtV3RlRltRtVtR#)r7i<>z<
The :class:`.MatchDetail` class contains information about
c<00>4<<01>V^8<>dQhRS[S[,RR/#)rr$rN)rr )rr<>s"<22>rr<00>MatchDetail.__annotate__<5F>s <00><><00> <06> <06>h<EFBFBD>w<EFBFBD>/<2F> <06>D<EFBFBD> rc <0C><00>WnR#)z<>
Initialize the :class:`.MatchDetail` instance.
*patterns* (:class:`~collections.abc.Sequence` of :class:`.Pattern`)
contains the patterns that matched the file in the order they were encountered.
N<EFBFBD>r$)r<>r$s&&rr<><00>MatchDetail.__init__<5F>s<00><00><1B>-<2D>rr<>N) r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>s@rr7r7<00>s<00><><00><00><05>
<1B><19> <06> rr7c<00><>a<00>]tRtRtoRtRtV3RlRltRV3RlRlltRV3RlR lltV3R
lR lt RV3R lR llt
Rt Vt R#)rVi<>zN
The :class:`TreeEntry` class contains information about a file-system entry.
c
<00>^<<01>V^8<>dQhRS[RS[RS[PRS[PRR/#)rrsr<00>lstatrtrN)rr<00> stat_result)rr<>s"<22>rr<00>TreeEntry.__annotate__<5F>sE<00><><00>&<06>&<06> <0B>&<06> <0C>&<06>
<0C><1E><1E> &<06>
<0B><0E><0E> &<06>  <0B> &rc <0C><<00>W0nWnW nW@nR#)a?
Initialize the :class:`TreeEntry` instance.
*name* (:class:`str`) is the base name of the entry.
*path* (:class:`str`) is the relative path of the entry.
*lstat* (:class:`os.stat_result`) is the stat result of the direct entry.
*stat* (:class:`os.stat_result`) is the stat result of the entry,
potentially linked.
N<EFBFBD><04>_lstatrsr<00>_stat)r<>rsrr<>rts&&&&&rr<><00>TreeEntry.__init__<5F>s2<00><00>(!&<26>+<2B><06><18>)<29><06><18>)<29><06> $<24>*<2A>rNc<00>6<<01>V^8<>dQhRS[S[,RS[/#<00>rrPr<00>r
r))rr<>s"<22>rrr<>s<00><><00>)<29>)<29><08><14><0E>)<29>$<24>)rc <0C><><00>VfRpV'd VPM VPp\P!VP4#)a0
Get whether the entry is a directory.
*follow_links* (:class:`bool` or :data:`None`) is whether to follow symbolic
links. If this is :data:`True`, a symlink to a directory will result in
:data:`True`. Default is :data:`None` for :data:`True`.
Returns whether the entry is a directory (:class:`bool`).
T)r<>r<>rt<00>S_ISDIR<49>st_mode<64>r<>rPr~s&& rr<00>TreeEntry.is_dir<00>5<00><00><12><19><16><<3C>(<28>d<EFBFBD>j<EFBFBD>j<EFBFBD>d<EFBFBD>k<EFBFBD>k<EFBFBD>)<29> <0A><1C><1C>i<EFBFBD>'<27>'<27> (<28>(rc<00>6<<01>V^8<>dQhRS[S[,RS[/#r<>r<>)rr<>s"<22>rrr<>,s<00><><00>)<29>)<29><18>$<24><1E>)<29>4<EFBFBD>)rc <0C><><00>VfRpV'd VPM VPp\P!VP4#)a9
Get whether the entry is a regular file.
*follow_links* (:class:`bool` or :data:`None`) is whether to follow symbolic
links. If this is :data:`True`, a symlink to a regular file will result in
:data:`True`. Default is :data:`None` for :data:`True`.
Returns whether the entry is a regular file (:class:`bool`).
T)r<>r<>rt<00>S_ISREGr<47>rs&& rrv<00>TreeEntry.is_file,rrc<00> <<01>V^8<>dQhRS[/#r<>)r))rr<>s"<22>rrr<><s<00><><00>+<2B>+<2B><14>+rc <0C>V<00>\P!VPP4#)z?
Returns whether the entry is a symbolic link (:class:`bool`).
)rt<00>S_ISLNKr<4B>r<>r<>s&rru<00>TreeEntry.is_symlink<s<00><00>
<0E><1C><1C>d<EFBFBD>k<EFBFBD>k<EFBFBD>)<29>)<29> *<2A>*rc<00>J<<01>V^8<>dQhRS[S[,RS[P/#r<>)r
r)rr<>)rr<>s"<22>rrr<>Bs#<00><><00> 5<> 5<>h<EFBFBD>t<EFBFBD>n<EFBFBD> 5<><02><0E><0E> 5rc <0C>N<00>VfRpV'd VP#VP#)a-
Get the cached stat result for the entry.
*follow_links* (:class:`bool` or :data:`None`) is whether to follow symbolic
links. If this is :data:`True`, the stat result of the linked file will be
returned. Default is :data:`None` for :data:`True`.
Returns that stat result (:class:`os.stat_result`).
T)r<>r<>)r<>rPs&&rrt<00>TreeEntry.statBs$<00><00><12><19><16><<3C>#<23><14><1A><1A>4<><14><1B><1B>4r)r<>r<>rsrr<><00>N) r<>r<>r<>r<>r<>r<>r<>rrvrurtr<>r<>r<>s@rrVrV<00>sI<00><><00><00><05>
1<><19>&<06>&<06>P)<29>)<29> )<29>)<29> +<2B>+<2B> 5<> 5<> 5rrVrr+)8r<38>r<00>os.pathrr<>rt<00>collections.abcrrrr<00> dataclassesr<00>typingrrr r
r r r0r <00>_typingrrr<00>PathLikerWrr <00>altsepr<70>r<>r"r3rBrHrMrTrar_rQr<>r<>r.r<>r<>r<>r<><00> Exceptionr<6E>rqr<><00>objectr7rV)<01>__seps0r<00><module>rs<><00><01><04>
<EFBFBD><0E><0E><10> <0B> <0B> <0B>
 <0C><08><08>
<EFBFBD> <0A> <10><03>R<EFBFBD>[<5B>[<5B><13>%<25>%<25>
&<26><07> <12>:<3A>W<EFBFBD> -<2D><08><04> <12>v<EFBFBD>v<EFBFBD>r<EFBFBD>y<EFBFBD>y<EFBFBD>!<21><02>!<21>U<EFBFBD> <09><07><13>y<EFBFBD>}<7D>}<7D>$<24><07><15>!<21><02><13>
<04><1A><14><04> <11>") <20>X+<15>\<03>(L<01> <0C>J<><03>L<01><03>L<01>[<01>BL<14>^Y<01>D;<14>| #<23><10>( <0C><13><03><15> <03><15>:%<12>P <0C><1C><03><13> <03><13>B.<2E>>,<16>Y<EFBFBD>,<16>^7<16>Y<EFBFBD>7<16>t <0B>$<24><17><05>'<27>(<28>#<23><05><18><05>><06>&<26><06>0c5<><06>c5<><35>Ms<00>
F<04>F<04>*F