Файловый менеджер - Редактировать - /usr/lib/python3.9/site-packages/libpasteurize/fixes/__pycache__/fix_annotations.cpython-39.pyc
Назад
a �c- � @ sJ d Z ddlmZ ddlmZ ddlmZ dZdd� ZG dd � d ej �Z d S )z& Fixer to remove function annotations � )� fixer_base)�token)�symsz)Removing function annotations completely.c C s | j d S )Nr )�children)�node� r �G/usr/lib/python3.9/site-packages/libpasteurize/fixes/fix_annotations.py�param_without_annotations s r c @ s$ e Zd ZdZdd� ZdZdd� ZdS )�FixAnnotationsFc C s | j sd| _ | j||d� d S )NT��reason)�warnedZwarning)�selfr r r r r � warn_once s zFixAnnotations.warn_oncezm funcdef< 'def' any parameters< '(' [params=any] ')' > ['->' ret=any] ':' any* > c C s� |� d�}|� d�}|durR|jjtjks2J d��| j|td� |j�� |�� |du r^dS |jtj kr�|j D ],}|jtjkrp| j|td� |�t |�� qpn(|jtjkr�| j|td� |�t |�� dS )zK This just strips annotations from the funcdef completely. �params�retNzInvalid return annotationr )�getZprev_sibling�typer �RARROWr �warning_text�remover Z typedargslistr Ztname�replacer )r r �resultsr r Zparamr r r � transform s zFixAnnotations.transformN)�__name__� __module__�__qualname__r r ZPATTERNr r r r r r s r N)�__doc__Zlib2to3r Z lib2to3.pgen2r Zlib2to3.fixer_utilr r r ZBaseFixr r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка