bgjddlmZddlZddlmZmZddlmZddlm Z m Z m Z dZ Gdde Z dS) ) annotationsN)Path PurePosixPath) OldJsonExport) PackageDataPackageMessages PrimerCommandic^eZdZddZeddZedd ZddZddZddZ dS)CompareCommandreturnNonecp||jj}||jj}|||\}}|||}t |jdz dd5}||ddddS#1swxYwYdS)Nz comment.txtwutf-8encoding) _load_jsonconfig base_filenew_file_cross_reference_create_commentopenprimer_directorywrite)self main_datapr_datamissing_messages_datanew_messages_datacommentfs /builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pylint/testutils/_primer/primer_compare_command.pyrunzCompareCommand.runsOODK$9:: //$+"677373H3H w4 4 00&&'<>OPP $'-7w O O O ST GGG                     sB++B/2B/rrr'tuple[PackageMessages, PackageMessages]c*i}|D]y\}}g}|dD]I} ||d|%#t$r||YFwxYwt ||d|||<z||fS)Nmessagescommit)r(r')itemsremove ValueErrorappendr)rrrpackagedatapackage_missing_messagesmessages r#rzCompareCommand._cross_references24&__..  MGT<> $ + = ==G$Z077@@@@!===,33G<<<<<=-8w'1🤖 **Effect of this PR on checked open source code:** 🤖 ug🤖 According to the primer, this change has **no effect** on the checked open source code. 🤖🎉 )r)lenMAX_GITHUB_COMMENT_LENGTH_create_comment_for_package_truncate_comment)rr7r8r!r-missing_messages new_messagess r#rzCompareCommand._create_comment5s)=)C)C)E)E   %G%7||888+G4L#J/  Z8P  t77'7 GG   Xw X X X: %%g...r-rArr@cd|d|j|jd}d}d}d}|drtd|dD]}tt |d |j|j} |d d kr|dz }Y||d |d d |dd|j|jd|dd| d|ddz }t||dz }|r||dz }|r |d|zdzz }d}|dr|dz }td|dD]}||d |d d |ddz }tt |d |j|j} |j|jdr Jd||j|jd|dd| d|ddz }|dz }t||r|dz }|S)Nz **Effect on [z](z):** rr;r'z Now emitted:pathsymbolz astroid-errorz) z: *r0z* z/blob/r(/z#Lline zc "astroid error(s)" were found. Please open the GitHub Actions log to see what failed or crashed. z4The following messages are now emitted:
z
z:The following messages are no longer emitted:
zNo longer emitted:z.gitz5You don't need the .git at the end of the github url.)packagesurlprintr9r relative_toclone_directoryendswith) rr-rAr@r!countastroid_errorsnew_non_astroid_messagesr0filepaths r#r>z*CompareCommand._create_comment_for_packageLs9TgSSw1G1KSSS#%  # " . ! ! !#J/  Ggfo..::M'*:Hx O33!#(rr 1rrwy7Irr}W-1rr9Eh9OrrRZrr^efl^mrrr(g    !XXX G $  J*+$% G J ' ( W WG & ' ' '' 3  G %QQ78#4QQ'):LQQQ QGgfo..::M'*:H }W-1:: G GF G G =)-RR%h/RR2:RR>EfoRRR G QJE 'NNNN  * ) )GrBr!c d|jjd}t|t|ztkrEdtd}tt|z t|z }|d|dz d|d}||z }|S) z;GitHub allows only a set number of characters in a comment.z'*This comment was generated for commit *z7*This comment was truncated because GitHub allows only z characters in a comment.*N z... z )rr(r<r=)rr!hash_informationtruncation_informationmax_lens r#r?z CompareCommand._truncate_comments Ldk6H K K K  w<<#.// /3L L LJ-JJJ # *&''(,--.  !'B,/TT8NTTTG##rBN)r r )rrrrr r%)r1r2r r)r7rr8rr r9)r-r9rArr@rr r9)r!r9r r9) __name__ __module__ __qualname__r$ staticmethodrrrr>r?rBr#r r s...\. \ ////.????BrBr ) __future__rr4pathlibrrpylint.reporters.json_reporterr'pylint.testutils._primer.primer_commandrrr r=r r^rBr#rcs#""""" ''''''''888888 "KKKKK]KKKKKrB