o 0i" @ sR d dl Z ddlmZ ddlmZ ddlmZ G dd deZG dd d eZ dS ) N )PatternCompiler)pygram)does_tree_importc @ s e Zd Z dZdZdZdZdZe dZ e ZdZ dZdZdZdZdZejZdd Zdd Zd d Zdd Zdd ZdddZdd ZdddZdd Zdd Zdd Z dS )BaseFixNr ZpostF c C s || _ || _| d S N)optionslogcompile_pattern)selfr r r 9/opt/alt/python310/lib64/python3.10/lib2to3/fixer_base.py__init__/ s zBaseFix.__init__c C s2 | j d urt }|j| j dd\| _| _d S d S )NT)Z with_tree)PATTERNr r patternpattern_tree)r ZPCr r r r ; s zBaseFix.compile_patternc C s || _ d S r )filename)r r r r r set_filenameF s zBaseFix.set_filenamec C s d|i}| j ||o |S )Nnode)r matchr r Zresultsr r r r M s z BaseFix.matchc C s t r )NotImplementedErrorr r r r transformY s zBaseFix.transformxxx_todo_changemec C s<