
    h                        S SK Jr  S SKr\" SS9S\S\4S j5       rSR                  5       rSS	S	S
SSSSS.rSR                  5       r	\R                  " \SS9r\R                  S 5        \R                  " \SS9r\R                  S 5        \R                  " \R                  R!                  \	5       S35      r\R                  S 5        \\-  \-  r\S:X  Ga  S SKrS SKJr  S SKr\R0                  " SS9r\R5                  SSSSS9  \R5                  S SS!S"S#9  \R5                  S$S%SS&S9  \R5                  S'\S(S)S*9  \R5                  S+S,SS-S9  \R5                  S.S/S0S19  \R7                  5       rS2 rS r\R>                   GH   r \" 5       RC                  \ 5       H  r"\" \"5      RG                  5       (       d  M    \" \"5      RI                  \RJ                  S39r&\RO                  \&5      r(\(\&:w  am  \RR                  (       a,  \" \"5      RU                  \(\RJ                  S39  \+" S4\" 35        O\+" S5\" 35        \RX                  (       a  \" \&\(5        \+" 5         S6rM  \RZ                  (       a  \+" S7\" 35        M  M     GM     \Rb                  " \Rd                  (       d  \OS 5        gg! \. a-  r/\+" S8\" S9\0" \/5      R&                   S9\/ 35         Sr/C/GM@  Sr/C/ff = f):    )	lru_cacheN)maxsizesreturnc                 P    SR                  S U  5       5      R                  S5      $ )z"
Convert CamelCase to snake_case.
 c              3   t   #    U  H.  oR                  5       (       a  S UR                  5       -   OUv   M0     g7f)_N)isupperlower).0cs     Z/var/www/html/env/lib/python3.13/site-packages/pyparsing/tools/cvt_pyparsing_pep8_names.py	<genexpr>!camel_to_snake.<locals>.<genexpr>
   s'     D!Qiikk3?q8!s   68r
   )joinlstrip)r   s    r   camel_to_snaker      s$    
 77D!DDKKCPP    a  
addCondition addParseAction anyCloseTag anyOpenTag asDict asList cStyleComment canParseNext conditionAsParseAction 
convertToDate convertToDatetime convertToFloat convertToInteger countedArray cppStyleComment dblQuotedString 
dblSlashComment defaultName dictOf disableMemoization downcaseTokens enableLeftRecursion enablePackrat getName 
htmlComment ignoreWhitespace indentedBlock infixNotation inlineLiteralsUsing javaStyleComment leaveWhitespace 
lineEnd lineStart locatedExpr matchOnlyAtCol matchPreviousExpr matchPreviousLiteral nestedExpr nullDebugAction oneOf 
originalTextFor parseFile parseString parseWithTabs pythonStyleComment quotedString removeQuotes replaceWith 
resetCache restOfLine runTests scanString searchString setBreak setDebug setDebugActions setDefaultWhitespaceChars 
setFailAction setName setParseAction setResultsName setWhitespaceChars sglQuotedString stringEnd stringStart tokenMap 
traceParseAction transformString tryParse unicodeString upcaseTokens withAttribute withClass
OpAssocDelimitedListreplace_html_entitymake_html_tagsmake_xml_tagscommon_html_entitystrip_html_tags)opAssocdelimitedListdelimited_listreplaceHTMLEntitymakeHTMLTagsmakeXMLTagscommonHTMLEntitystripHTMLTagsa  parseAll maxMatches listAllMatches callDuringTry includeSeparators fullDump printResults 
failureTests postParse matchString identChars maxMismatches initChars bodyChars asKeyword excludeChars asGroupList 
asMatch quoteChar escChar escQuote unquoteResults endQuoteChar convertWhitespaceEscapes notChars wordChars stopOn 
failOn joinString markerString intExpr useRegex asString ignoreExprT)
as_keywordc                     [        U S   5      $ Nr   r   ts    r   <lambda>r+   *   s    qt0Dr   c                     [         U S      $ r'   )special_changesr)   s    r   r+   r+   ,   s    11Fr   z\s*=c                     [        U S   5      $ r'   r(   r)   s    r   r+   r+   1   s    ^AaD-Ar   __main__)PathzUtility to convert Python pyparsing scripts using legacy camelCase names to use PEP8 snake_case names.
By default, this script will only show whether this script would make any changes.)descriptionz	--verbosez-v
store_truez&Show unified diff for each source file)actionhelpz-vvverbose2zSShow unified diff for each source file, plus names of scanned files with no changes)r3   destr4   z--updatez-uzUpdate source files in-placez
--encodingzutf-8z)Encoding of source files (default: utf-8))typedefaultr4   z--exit-zero-even-if-changedz-exit0z1Exit with status code 0 even if changes were madesource_filename+zESource filenames or filename patterns of Python files to be converted)nargsr4   c                     SS K nUR                  U R                  5       UR                  5       SS9n[        R                  R                  S U 5       5        g )Nr   r   )linetermc              3   *   #    U  H	  o S 3v   M     g7f)
N )r   	diff_lines     r   r   show_diffs.<locals>.<genexpr>P   s     E92.s   )difflibunified_diff
splitlinessysstdout
writelines)originalmodifiedrC   diffs       r   
show_diffsrL   J   sM    ##!8#6#6#82 $ 
 	

EEEr   )encodingz
Converted zFound required changes in    zNo required changes in zFailed to convert z: )3	functoolsr   	pyparsingppstrr   splitpre_pep8_method_namesr-   pre_pep8_arg_namesone_ofpre_pep8_method_nameset_parse_actionspecial_pre_pep8_nameRegexutilmake_compressed_repre_pep8_arg_namepep8_converter__name__argparsepathlibr0   rF   ArgumentParser	argparseradd_argument
parse_argsargsrL   exit_statusr9   filename_patternglobfilenameis_file	read_textrM   original_contentstransform_stringmodified_contentsupdate
write_textprintverboser5   	Exceptioner7   exitexit_zero_even_if_changedr@   r   r   <module>rx      sP     4Qc Qc Q Q
 
EG  $%.$",&	G HMuw 
 yy!64H   % %&D E		/dC   & &'F GHH
""#567t<   " "#A B%(==@QQz''cI ;\Hpq5J  Nc  d:tLGef<c7Itu8(<  _R  S,C  ?F  G!DF K 00$45H>))++P$(N$<$<dmm$<$T!$2$C$C%%! %(99{{X112Cdmm1\
8*56 :8*EF||"#46GH"#K }} 7zBC %1 6 1@ HH > >[AF x  P*8*BtAw7G7G6H1#NOOPs   B!J3%J33K&9!K!!K&