o
bcB @ s> d Z ddlmZ ddlmZ ddlmZ G dd dejZdS )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 @ s@ e Zd ZdZdZeejdZeej dZ ee fZ
dd ZdS )
FixWsCommaTzH
any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
,:c C s` | }d}|jD ]$}|| jv r!|j}| rd|vrd|_d}q |r+|j}|s+d|_d}q |S )NF
T )clonechildrenSEPSprefixisspace)selfnoderesultsnewcommachildr r 1/usr/lib/python3.10/lib2to3/fixes/fix_ws_comma.py transform s
zFixWsComma.transformN)__name__
__module____qualname__explicitPATTERNr Leafr COMMACOLONr
r r r r r r s r N)__doc__r r pgen2r r BaseFixr r r r r