| Server IP : 45.130.228.180 / Your IP : 216.73.216.204 Web Server : LiteSpeed System : Linux sg-nme-web1519.main-hosting.eu 5.14.0-611.16.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Dec 22 03:40:39 EST 2025 x86_64 User : u174041621 ( 174041621) PHP Version : 8.2.30 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib64/python3.9/lib2to3/__pycache__/ |
Upload File : |
a
�isk � @ s d Z dZddlZddlZddlZddlZddlZddlZddlZddl m
Z
ddlmZm
Z
mZ ddlmZ ddlmZmZ dd lmZ d!dd�ZG d
d� de�Zdd� Zdd� Zdd� Zdd� Zdd� ZG dd� de�ZG dd� de�Z G dd� de�Z!G dd � d e �Z"dS )"z�Refactoring framework.
Used as a main program, this can refactor any number of files and/or
recursively descend down directories. Imported as a module, this
provides infrastructure to write your own refactoring tool.
z#Guido van Rossum <guido@python.org>� N)�chain� )�driver�tokenize�token)� find_root)�pytree�pygram)�btm_matcherTc C sT t | g g dg�}g }t�|j�D ].\}}}|�d�r |rD|dd� }|�|� q |S )zEReturn a sorted list of all available fix names in the given package.�*�fix_� N)�
__import__�pkgutil�iter_modules�__path__�
startswith�append)Z fixer_pkgZ
remove_prefix�pkgZ fix_names�finder�name�ispkg� r �(/usr/lib64/python3.9/lib2to3/refactor.py�get_all_fix_names s
r c @ s e Zd ZdS )�
_EveryNodeN��__name__�
__module__�__qualname__r r r r r + s r c C s� t | tjtjf�r(| jdu r t�| jhS t | tj�rH| jrDt| j�S t�t | tj �r�t
� }| jD ]}|D ]}|�t|�� qhq`|S td| ��dS )zf Accepts a pytree Pattern Node and returns a set
of the pattern types which will match first. Nz$Oh no! I don't understand pattern %s)
�
isinstancer ZNodePatternZLeafPattern�typer ZNegatedPatternZcontent�_get_head_typesZWildcardPattern�set�update� Exception)�pat�r�p�xr r r r"