ProShell v2.0
Dashboard
Server Info
Server: 127.0.0.80
PHP: 8.3.31
home
clients
08ce2314c3c7e396ea36e41d2a860c5e
sites
filmerletravail.org
wp-content
mu-plugins
2026-08-25 16:04:17
Editing: fix_filter.cpython-39.pyc
Cancel
Save Changes
a �0`� � @ sZ d Z ddlmZ ddlmZ ddlmZ ddlm Z m Z mZmZm Z G dd� dej�ZdS ) a� Fixer that changes filter(F, X) into list(filter(F, X)). We avoid the transformation if the filter() call is directly contained in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:. NOTE: This is still not correct if the original code was depending on filter(F, X) to return a string if X is a string and a tuple if X is a tuple. That would require type inference, which we don't do. Let Python 2.6 figure it out. � )� fixer_base)�Node)�python_symbols)�Name�ArgList�ListComp�in_special_context�parenthesizec @ s e Zd ZdZdZdZdd� ZdS )� FixFilterTaV filter_lambda=power< 'filter' trailer< '(' arglist< lambdef< 'lambda' (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any > ',' it=any > ')' > [extra_trailers=trailer*] > | power< 'filter' trailer< '(' arglist< none='None' ',' seq=any > ')' > [extra_trailers=trailer*] > | power< 'filter' args=trailer< '(' [any] ')' > [extra_trailers=trailer*] > zfuture_builtins.filterc C sL | � |�rd S g }d|v r6|d D ]}|�|�� � q"d|v r�|�d��� }|jtjkrfd|_t|�}t |�d��� |�d��� |�d��� |�}t tj|g| dd�}n�d|v r�t td �td �|d �� td ��}t tj|g| dd�}nTt |�r�d S |d �� }t tjtd�|gdd�}t tjtd �t|g�g| �}d|_|j|_|S )NZextra_trailersZ filter_lambda�xp� �fp�it)�prefixZnoneZ_f�seq�args�filter�list)Zshould_skip�appendZclone�get�type�syms�testr r r r Zpowerr r r )�selfZnodeZresultsZtrailers�tr �newr � r �./usr/lib/python3.9/lib2to3/fixes/fix_filter.py� transform: s>