G T d Z ddlmZ ddlmZ ddlmZ G d dej ZdS )zFixer that changes 'a ,b' into 'a, b'.
This also changes '{a :b}' into '{a: b}', but does not touch other
uses of colons. It does not touch other uses of whitespace.
)pytree)token)
fixer_basec | e Zd ZdZdZ ej ej d Z ej ej d Z ee fZ
d ZdS )
FixWsCommaTzH
any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
,:c | }d}|j D ]H}|| j v r)|j }| rd|vrd|_ d}4|r|j }|sd|_ d}I|S )NF
T )clonechildrenSEPSprefixisspace)selfnoderesultsnewcommachildr s G/opt/alt/python-internal/lib64/python3.11/lib2to3/fixes/fix_ws_comma.py transformzFixWsComma.transform s jjll\ E !!>>## &F(:(:#%EL +"\F! +'*
N)__name__
__module____qualname__explicitPATTERNr Leafr COMMACOLONr r r r r r sd HG
FKS))EFKS))E5>D r r N)__doc__r r pgen2r r BaseFixr r$ r r