
    \Og
                        S r SSKJr  SSKrSSKrSSKJr  SSKJr  SSKJ	r	  SSK
Jr  \R                  " \5      r      S
S jr          SS	 jrg)z'Functions related to discovering paths.    )annotationsN)Callable)	Generator)Sequence)utilsc             #    #    U" U 5      (       a  g[         R                  R                  U 5      (       a  [         R                  " U 5       H  u  p#n[	        U5       HB  n[         R                  R                  X%5      nU" U5      (       d  M1  UR                  U5        MD     U H5  n[         R                  R                  X'5      nU" U5      (       a  M1  Uv   M7     M     gU v   g7f)aQ  Generate filenames from an argument.

:param arg:
    Parameter from the command-line.
:param predicate:
    Predicate to use to filter out filenames. If the predicate
    returns ``True`` we will exclude the filename, otherwise we
    will yield it. By default, we include every filename
    generated.
:returns:
    Generator of paths
N)ospathisdirwalktuplejoinremove)arg	predicaterootsub_directoriesfiles	directoryjoinedfilenames           Z/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/flake8/discover_files.py_filenames_fromr      s     " ~~	ww}}S,.GGCL(D5 #?3	d6V$$#**95 4
 "d5 (( L " -9 	s   BC'AC'C'c                J   ^^^^ U (       d  S/n SUU4S jjmUU4S jU  5       $ )z<Expand out ``paths`` from commandline to the lintable files..c                X   > U S:X  a	  TS:X  a  gTn [         R                  " U TS[        S9$ )N-stdinFz'"%(path)s" has %(whether)sbeen excluded)patternslog_messagelogger)r   matches_filenameLOG)r   excludestdin_display_names    r   is_excluded!expand_paths.<locals>.is_excluded?   s9    #:!W,$C%%A	
 	
    c              3     >#    U  HB  n[        UTS 9  H0  nUS:X  d#  X:X  d  [        R                  " UT5      (       d  M,  Uv   M2     MD     g7f))r   r   N)r   r   fnmatch).0r
   r   filename_patternsr&   s      r   	<genexpr>expand_paths.<locals>.<genexpr>M   sL      D'DH O}}X'89 	D 	s   9A A)r   strreturnbool )pathsr%   r,   r$   r&   s    ```@r   expand_pathsr4   4   s+     
 
 r(   )r   r/   r   zCallable[[str], bool]r0   Generator[str, None, None])
r3   Sequence[str]r%   r/   r,   r6   r$   r6   r0   r5   )__doc__
__future__r   loggingos.pathr	   typingr   r   r   flake8r   	getLogger__name__r#   r   r4   r2   r(   r   <module>r?      s    - "      !"	" %"  	"J%% % %	%
 %  %r(   