Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/mercurial/__pycache__/ |
Upload File : |
o �]LbG � @ s� d dl mZ ddlmZmZmZmZ ejZG dd� de �Z G dd� de �ZdZG d d � d e �Z G dd� de �ZG d d� de �ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de �ZdS )� )�absolute_import� )�configitems�error�pycompat�utilc @ sV e Zd ZdZddd�Zdd� Zdd� Zd d � Zdd� Zd d� Z dZ dd� Zdd� ZdS )�_funcregistrarbasea� Base of decorator to register a function for specific purpose This decorator stores decorated functions into own dict 'table'. The least derived class can be defined by overriding 'formatdoc', for example:: class keyword(_funcregistrarbase): _docformat = ":%s: %s" This should be used as below: keyword = registrar.keyword() @keyword(b'bar') def barfunc(*args, **kwargs): '''Explanation of bar keyword .... ''' pass In this case: - 'barfunc' is stored as 'bar' in '_table' of an instance 'keyword' above - 'barfunc.__doc__' becomes ":bar: Explanation of bar keyword" Nc C s |d u r i | _ d S || _ d S �N)�_table)�self�table� r �5/usr/lib/python3/dist-packages/mercurial/registrar.py�__init__4 s z_funcregistrarbase.__init__c s � ���fdd�S )Nc s �j | �g� �R i ���S r )�_doregister)�func��args�decl�kwargsr r r �<lambda>; s z-_funcregistrarbase.__call__.<locals>.<lambda>r )r r r r r r r �__call__: s z_funcregistrarbase.__call__c O s� | � |�}|| jv rd| }t�|��|jr2t�|d�s2|j�� |_t � |j�}t �| �||��|_|| j|<