HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/local/lib/python3.9/site-packages/celery/contrib/__pycache__/sphinx.cpython-39.pyc
a

X>h?
�@stdZddlmZddlmZddlmZddlmZddl	m
Z
Gdd�de�ZGd	d
�d
e�Zdd�Z
d
d�ZdS)a]Sphinx documentation plugin used to document tasks.

Introduction
============

Usage
-----

The Celery extension for Sphinx requires Sphinx 2.0 or later.

Add the extension to your :file:`docs/conf.py` configuration module:

.. code-block:: python

    extensions = (...,
                  'celery.contrib.sphinx')

If you'd like to change the prefix for tasks in reference documentation
then you can change the ``celery_task_prefix`` configuration value:

.. code-block:: python

    celery_task_prefix = '(task)'  # < default

With the extension installed `autodoc` will automatically find
task decorated objects (e.g. when using the automodule directive)
and generate the correct (as well as add a ``(task)`` prefix),
and you can also refer to the tasks using `:task:proj.tasks.add`
syntax.

Use ``.. autotask::`` to alternatively manually document a task.
�)�	signature)�nodes)�
PyFunction)�FunctionDocumenter)�BaseTaskcsFeZdZdZdZdZedd��Zdd�Zd
d	d
�Z	�fdd�Z
�ZS)�TaskDocumenterzDocument task definitions.�task�cCst|t�ot|d�S)N�__wrapped__��
isinstancer�getattr)�cls�memberZ
membernameZisattr�parent�r�?/usr/local/lib/python3.9/site-packages/celery/contrib/sphinx.py�can_document_member0sz"TaskDocumenter.can_document_membercCs\t|jdd�}|durXt|�}d|jvs2d|jvrP|jt|j���dd�d�}t|�SdS)Nr
�selfr�)�
parameters�)r
�objectrr�replace�list�values�str)r�wrapped�sigrrr�format_args4szTaskDocumenter.format_argsFcCsdS�Nr)rZall_membersrrr�document_members=szTaskDocumenter.document_memberscs0t|jdd�}|r&t|d�|jkr&dSt���S)Nr
�
__module__T)r
r�modname�super�check_module)rr��	__class__rrr%@szTaskDocumenter.check_module)F)�__name__r"�__qualname__�__doc__ZobjtypeZmember_order�classmethodrrr!r%�
__classcell__rrr&rr*s
	
rc@seZdZdZdd�ZdS)�
TaskDirectivezSphinx task directive.cCst�|jjj�gSr )r�Text�env�config�celery_task_prefix)rrrrr�get_signature_prefixNsz"TaskDirective.get_signature_prefixN)r(r"r)r*r2rrrrr-Ksr-cCs t|t�rt|d�r|rdSdS)z&Handler for autodoc-skip-member event.r
FNr)�app�what�name�obj�skip�optionsrrr�autodoc_skip_member_handlerRsr9cCsD|�d�|�t�|�ddt�|�ddd�|�dt�ddiS)	zSetup Sphinx extension.zsphinx.ext.autodoc�pyrr1z(task)Tzautodoc-skip-memberZparallel_read_safe)Zsetup_extensionZadd_autodocumenterrZadd_directive_to_domainr-Zadd_config_value�connectr9)r3rrr�setup_s

�r<N)r*�inspectrZdocutilsrZsphinx.domains.pythonrZsphinx.ext.autodocrZcelery.app.taskrrr-r9r<rrrr�<module>s !