3
+��hx � @ sN d Z ddlmZ ddlmZmZmZ ddlmZ dd� Z G dd� dej
�Zd S )
z8
Fixer for "class Foo: ..." -> "class Foo(object): ..."
� )�
fixer_base)�LParen�RParen�Name)�touch_import_topc C s0 | j |t� � | j |td�� | j |t� � d S )N�object)Zinsert_childr r r )�node�idx� r
�G/root/tmp/pip-build-yeh9mt8d/future/libpasteurize/fixes/fix_newstyle.py�
insert_object s r c @ s e Zd ZdZdd� ZdS )�FixNewstylez0classdef< 'class' NAME ['(' ')'] colon=':' any >c C sn |d }|j j|�}|j |d jdkrT|j |d jdkrT|j |d |�= |d8 }t||� tdd|� d S )N�colon� �(� �)�builtinsr )�children�index�valuer r )�selfr �resultsr r r
r
r � transform s
zFixNewstyle.transformN)�__name__�
__module__�__qualname__ZPATTERNr r
r
r
r r
s r
N)�__doc__Zlib2to3r Zlib2to3.fixer_utilr r r Zlibfuturize.fixer_utilr r ZBaseFixr
r
r
r
r �<module> s
|