| Server IP : 62.171.151.215 / Your IP : 216.73.217.53 Web Server : nginx/1.18.0 System : Linux vmi3128365 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64 User : alex ( 1000) PHP Version : 8.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/hamcrest/library/text/__pycache__/ |
Upload File : |
o
(]^� � @ s� d dl Z d dlmZmZ d dlmZ d dlmZ d dlm Z dZ
dZdZG d d
� d
ee
�Zdee
ee
f de e
fd
d�ZdS )� N)�Pattern�Union)�BaseMatcher)�Description)�Matcherz
Chris RosezCopyright 2011 hamcrest.orgzBSD, see License.txtc @ s: e Zd Zddd�Zdeddfdd�Zdedefd d
�ZdS )�StringMatchesPattern�returnNc C s
|| _ d S �N��pattern)�selfr � r
�E/usr/lib/python3/dist-packages/hamcrest/library/text/stringmatches.py�__init__ s
zStringMatchesPattern.__init__�descriptionc C s |� d�� | jj�� d� d S )Nza string matching '�')�append_textr )r r r
r
r �describe_to s
�z StringMatchesPattern.describe_to�itemc C s | j �|�d uS r )r �search)r r r
r
r �_matches s zStringMatchesPattern._matches)r N) �__name__�
__module__�__qualname__r r r �str�boolr r
r
r
r r
s
r r r c C s t | t�r
t�| �} t| �S )aK Matches if object is a string containing a match for a given regular
expression.
:param pattern: The regular expression to search for.
This matcher first checks whether the evaluated object is a string. If so,
it checks if the regular expression ``pattern`` matches anywhere within the
evaluated object.
)�
isinstancer �re�compiler r
r
r
r �matches_regexp s
r )r �typingr r �hamcrest.core.base_matcherr �hamcrest.core.descriptionr �hamcrest.core.matcherr �
__author__�
__copyright__�__license__r r r r
r
r
r �<module> s &