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/utils/__pycache__/annotations.cpython-39.pyc
a

X>h$�@sxdZddlZddlZddlZddlmZejed�dd�Zejejd�dd	�Z	ejed�d
d�Z
ejeed�d
d�ZdS)z%Code related to handling annotations.�N)�isclass)�value�returncCs tjdkr|td�uS|tjkS)z'Check if the given value is a NoneType.���
N)�sys�version_info�type�typesZNoneType)r�r�B/usr/local/lib/python3.9/site-packages/celery/utils/annotations.py�is_none_type	s
r)�
annotationrcCsvt�|�}|tjkr,tjdkr,|tjkr,dSt�|�}t|�dkrFdSt	dd�|D��}t
dd�|D��}|rr|SdS)zWGet the argument from an Optional[...] annotation, or None if it is no such annotation.rN�css|]}t|�VqdS�N�r��.0�argrrr
�	<genexpr>�z#get_optional_arg.<locals>.<genexpr>css|]}t|�s|VqdSrrrrrr
rr)�typing�
get_origin�Unionrr	rZ	UnionType�get_args�len�any�next)r�originZ
union_argsZhas_none_argZtype_argrrr
�get_optional_args

r cCs2dtjkrdkr*nnt|tj�r*dSt|�S)zTTest if a given annotation is a class that can be used in isinstance()/issubclass().)r�	)r�F)rr	�
isinstancer�GenericAliasr)rrrr
�annotation_is_class%s&r%)r�clsrcCst|�ot||�S)z4Test if a given annotation is of the given subclass.)r%�
issubclass)rr&rrr
�annotation_issubclass/sr()
�__doc__rrr�inspectr�Any�boolrr r%r
r(rrrr
�<module>s