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: //proc/self/root/usr/local/lib/python3.9/site-packages/kombu/__pycache__/matcher.cpython-39.pyc
a

X>h��@s�dZddlmZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
eeegefZGd	d
�d
e�ZGdd�d�Ze�ZejZejZejZd
d�dd�Zd
d�dd�Ze�e�e�d�ed�D]\ZZeejge�R�q�dS)zPattern matching registry.�)�annotations)�fnmatch)�match)�Callable�cast�)�entrypoints)�bytes_to_strc@seZdZdZdS)�MatcherNotInstalledzMatcher not installed/found.N)�__name__�
__module__�__qualname__�__doc__�rr�7/usr/local/lib/python3.9/site-packages/kombu/matcher.pyr
sr
c@sreZdZdZeZdgZdd�dd�Zdddd	�d
d�Zddd�d
d�Zddd�dd�Z	ddddddd�dd�Z
dS)�MatcherRegistryz#Pattern matching function registry.�pcre�None��returncCsi|_d|_dS)N)�	_matchers�_default_matcher)�selfrrr�__init__szMatcherRegistry.__init__�str�MatcherFunction)�name�matcherrcCs||j|<dS)z$Add matcher by name to the registry.N)r)rrrrrr�registerszMatcherRegistry.register)rrcCs8z|j�|�Wn"ty2|�d|����Yn0dS)z)Remove matcher by name from the registry.�No matcher installed for N)r�pop�KeyErrorr
�rrrrr�
unregister!s�zMatcherRegistry.unregistercCs8z|j||_Wn"ty2|�d|����Yn0dS)aHSet the default matching method.

        :param name: The name of the registered matching method.
            For example, `glob` (default), `pcre`, or any custom
            methods registered using :meth:`register`.

        :raises MatcherNotInstalled: If the matching method requested
            is not available.
        rN)rrr!r
r"rrr�_set_default_matcher*s
�z$MatcherRegistry._set_default_matcherN�bytesz
str | Nonezdict[str, str] | None�bool)�data�patternr�matcher_kwargsrcCsp|r |j�|�s |�d|����|j|p*d}||jvrJt|�}t|�}nt|�}t|�}|||fi|pji��S)zCall the matcher.r�glob)r�getr
�matcher_pattern_firstr	)rr'r(rr)Z
match_funcZ	first_argZ
second_argrrrr;s�

zMatcherRegistry.match)NN)rrr
rr
r,rrr#r$rrrrrrs	�rrrcCst�dt�dS)z$Register glob into default registry.r*N)�registryrrrrrr�
register_glob}sr.cCst�dttt��dS)z$Register pcre into default registry.rN)r-rrr�rematchrrrr�
register_pcre�sr0r*zkombu.matchersN)r�
__future__rr�rerr/�typingrrZutils.compatrZutils.encodingr	rr&r�	Exceptionr
rr-rr#r.r0r$�ep�argsrrrrr�<module>s(?