~yddlmZddlZddlZddlZddlmZddlmZddl m Z ddl m Z m Z ddZd dZd!dZd"dZd#dZd$dZdS)%) annotationsN)Sequence)Pattern)modutils)ErrorDescriptionDictModuleDescriptionDictfilenamestr is_namespaceboolpath list[str]returnc>d fd }tj|||S) N inner_pathr partsrrr c2tj||pSN)rcheck_modpath_has_init)rrr s l/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pylint/lint/expand_modules.py_is_package_cbz*_modpath_from_file.._is_package_cbs.z5AAQ\Q)r is_package_cb)rr rrrr )rmodpath_from_file_with_callback)r r r rs ` r_modpath_from_filersJRRRRRR  3t>   rfilepathcZtjdtdt|gS)Nzget_python_path has been deprecated because assumption that there's always an __init__.py is not true since python 3.3 and is causing problems, particularly with PEP 420.Use discover_package_path and pass source root(s).) stacklevel)warningswarnDeprecationWarningdiscover_package_path)rs rget_python_pathr$s: M =   !2 . ..r modulepath source_roots Sequence[str]ctjtj|}tj|stj|}|D]g}tjtj|}tj||g|kr|cSh tjtj|ds|S|}tj|}||krtj Sz)z>G 7== ! !+'//'**$ g&&rw'9'9+'F'FGG 7  {G4 5 5 D D    E w~~bgll7MBBCC N '//'** ' ! !9;;  relementignore_list_relist[Pattern[str]]c:tfd|DS)zz(_is_in_ignore_list_re..@s1NN||!!'**NNNNNNr)any)r5r6s` r_is_in_ignore_list_rer?>s& NNNN~NNN N NNr ignore_listignore_list_paths_rectj|}tj|}||vpt ||pt ||Sr)r*r normpathbasenamer?)r5r@r6rArDs r_is_ignored_filerECsb gw''Gw((HK @ > : : @ *> ? ?rfiles_or_modulesCtuple[dict[str, ModuleDescriptionDict], list[ErrorDescriptionDict]]ci}g}tj}|D]9}tj|} t ||||r5t ||} d| g|z} tj|r dtj || } n5#t$r(tj | d} YnwxYwtj |r!tj|d} ne|} nb|} tj| d| } | >n1#t$r$}|d| |dYd}~hd}~wwxYwtj| } | p|d} tj|| }tj|}tj|}n1#t$r$d}tj |}YnwxYw|s| |vr d || d <n | | d | | d || <| d p| d k o"tj| dk}|s|s|rtjtj| ||D]}| |kr t1tj||st1||rGt3||| }d|}||vo ||d }|||| | d ||<;||fS)zTake a list of files/modules/packages and return the list of tuple (file, module name) which have to be actually checked. .)r rr)Nfatal)keymodexFTisarg)r namerNbasepathrDz .__init____init__)list_all)sysr copyr*rDrEr#r0r1rmodpath_from_file ImportErrorsplitextr-file_from_modpathsplitappendrCfile_info_from_modpathr is_directoryendswithget_module_filesr.r?r)rFr&r@r6rAresulterrorsr somethingrDmodule_package_pathadditional_search_pathmodnamerrMmodpartsspecr r\has_init subfilepathmodpath submodnamerNs rexpand_modulesrkSs02F)+F 8==??D%TT 7##I..  {N4H    3I|LL"%':!;d!B 7>>) $ $  8((.y?UVVV 8 8 8'**844Q7 8w}}Y'' %7<< =AA$ G #5MM#&&-C#$    ggRHHIII 7##H--(y//44 725D$066L#066LL  4 4 4 L7==33LLL 4 6!!,0x ))%#! ( ' $$x !!+..G'Z2G H <  **m;   | | '8));      {**(G$$[11>*;8LMM,4J!XXg.. #v-N&2Eg2N'&" ( ' ''{## 6>s<)B;;/C-,C-6+E$$ F.F  F H  +H98H9)r r r r r rrr)rr rr )r%r r&r'rr )r5r r6r7rr ) r5r r@rr6r7rAr7rr ) rFr'r&r'r@rr6r7rAr7rrG) __future__rr*rSr collections.abcrrerastroidr pylint.typingrrrr$r#r?rErkrrrrs #""""" $$$$$$EEEEEEEE / / / /.OOOO     ccccccr