Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/__pycache__/decorator.cpython-39.pyc
Ðазад
a h�h�B � @ s� d Z ddlZddlZddlZddlZddlZddlZddlmZ ddlm Z m Z mZ dZe� d�ZejjZejjZG dd� de�Zd d � Zdd d�Zdd� Zddd�ZG dd� de�Zee�Zdd� Zdd� Zdd� ZdS )zv Decorator module, see https://github.com/micheles/decorator/blob/master/docs/documentation.md for the documentation. � N)�_GeneratorContextManager)�getfullargspec�iscoroutinefunction�isgeneratorfunctionz5.2.1z\s*def\s*([_\w][_\w\d]*)\s*\(c @ sZ e Zd ZdZe�� Zd Z Z Z Z ZZddd�Z dd� Zdd d �Zeddd ��ZdS )� FunctionMakerz� An object with the ability to create functions with a given signature. It has attributes name, doc, module, signature, defaults, dict and methods update and make. � Nc C s� || _ |�rf|j| _| jdkr$d| _|j| _|j| _t�|�sLt |t j��rft|�}t |di �| _dD ]} t| | t || �� qft| j�D ]\} }t| d| |� q�t| j�}t| j�} | jr�|�d| j � | �d| j � n| jr�|�d� | jD ]$} |�d| � | �d| | f � q�| j�rB|�d | j � | �d | j � d �|�| _d �| �| _ |j�� | _|�rr|| _|d u�r�|| _|�r�|| _|�r�|| _|�r�|| _|�r�|| _t| d��s�J �t| d��s�td | ��d S )Nz<lambda>Z_lambda_�__annotations__)�args�varargs�varkw�defaults� kwonlyargs�kwonlydefaultszarg%d�*z%s=Nonez%s=%sz**�, �name� signaturez%You are decorating a non function: %s)�shortsignature�__name__r �__doc__�doc� __module__�module�inspect� isroutine� isinstance� functools�partialr �getattr�annotations�setattr� enumerater �listr �appendr r �joinr �__dict__�copy�dictr �hasattr� TypeError)�self�funcr r r r r ZfuncdictZargspec�a�i�argZallargsZallshortargsr r �y/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/decorator.py�__init__A sZ zFunctionMaker.__init__c K s� | j |_t| dd�|_t| di �|_| j|_| jp4d|_t| dd�|_ zt �d�}W n tyj d}Y n0 |j �dd�}t| d|�|_|j�|� dS ) zD Update the signature of func with the data in self r Nr'