l]aQdZddlZddlZddlmZddlmZddlmZddlm Z ej e Z de dee gefd ee ddffd Zd ee d e d ee dee ded ee ddff dZdS)z'Functions related to discovering paths.N)Callable) Generator)Sequence)utilsarg predicatereturnc#K||rdStj|rtj|D]\}}}t |D]B}tj||}||r||C|D]1}tj||}||s|V2dS|VdS)ayGenerate 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)ospathisdirwalktuplejoinremove)rrrootsub_directoriesfiles directoryjoinedfilenames /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/flake8/discover_files.py_filenames_fromr s"y~~ w}}S,.GCLL ! ! (D/5#?33 6 6 dI669V$$6#**9555! ! !dH55 y((! LLL ! ! ! pathsstdin_display_namefilename_patternsexcludeis_running_from_diffc|sdg}dtdtffd dtdtdtffd fd|DS)z.is_excluded>sG #::!W,,u$C% A     rfnamectrtj|S|dkp||kptj|S)Nr#)rfnmatch)rr+rrs r is_includedz!expand_paths..is_includedLsQ =(9:: : ;%<;=(9::  rc3\K|]&}t|D]}|||V'dS))rN)r).0r rr*r.s r zexpand_paths..[sm   ' DDD    ;tX & &         r)strbool)rrrrrr*r.s ````@@r expand_pathsr42s               S T               r)__doc__loggingos.pathr typingrrrflake8r getLogger__name__r)r2r3rr4rrr=s---g!!" "t $"sD$ """"J. C=.. } . c] .  .sD$......r