/ lib / soupsieve / __init__.pyc
__init__.pyc
 1  o

 2  t�cm�@s�dZddlmZmZddlmZddlmZddlm	Z
 3  ddlmZm
Z
ddlZdd	lmZmZmZmZmZmZd
 4  ZejZ		d)dd�ded
eeeefdedeeeefdedejfdd�Zd*dd�Z		d)dd�deddd
eeeefdedeeeefdeddfdd�Z		d)dd�deddd
eeeefdedeeeefdedefdd�Z		d)dd�dededd
eeeefdedeeeefdededfdd�Z		d)dd�deddd
eeeefdedeeeefdeddfd d!�Z 			d+dd�deddd
eeeefd"ededeeeefdededfd#d�Z!			d+dd�deddd
eeeefd"ededeeeefdededfd$d%�Z"d&edefd'd(�Z#dS),ad
 5  Soup Sieve.
 6  
 7  A CSS selector filter for BeautifulSoup4.
 8  
 9  MIT License
10  
11  Copyright (c) 2018 Isaac Muse
12  
13  Permission is hereby granted, free of charge, to any person obtaining a copy
14  of this software and associated documentation files (the "Software"), to deal
15  in the Software without restriction, including without limitation the rights
16  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17  copies of the Software, and to permit persons to whom the Software is
18  furnished to do so, subject to the following conditions:
19  
20  The above copyright notice and this permission notice shall be included in all
21  copies or substantial portions of the Software.
22  
23  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29  SOFTWARE.
30  �)�__version__�__version_info__)�
31  css_parser)�	css_match)�	css_types)�DEBUG�SelectorSyntaxError�N)�Dict�Optional�Any�List�Iterator�Iterable)
32  rr�	SoupSieve�closest�compile�filter�iselect�match�select�
33  select_one)�custom�pattern�
34  namespaces�flagsr�kwargs�returncKsv|dur	t�|�n|}|durt�|�n|}t|t�r3|r!td��|dur)td��|dur1td��|St�||||�S)zCompile CSS pattern.Nz;Cannot process 'flags' argument on a compiled selector listz@Cannot process 'namespaces' argument on a compiled selector listz<Cannot process 'custom' argument on a compiled selector list)�ct�
35  Namespaces�CustomSelectors�
36  isinstancer�
37  ValueError�cp�_cached_css_compile)rrrrr�ns�cs�r'��C:\Users\Jacks.GUTTSPC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\soupsieve\__init__.pyr-s
38  
39  rcCst��dS)zPurge cached patterns.N)r#�_purge_cacher'r'r'r(�purgeFsr*r�tagzbs4.TagcK�t|||fi|���|�S)zMatch closest ancestor.)rr�rr+rrrrr'r'r(rL�rcKr,)zMatch node.)rrr-r'r'r(rZr.r�iterablecKr,)zFilter list of nodes.)rr)rr/rrrrr'r'r(rhr.rcKr,)zSelect a single tag.)rrr-r'r'r(rvr.r�limitcKst|||fi|���||�S)zSelect the specified tags.)rr)rr+rr0rrrr'r'r(r�scks.�t|||fi|���||�D]}|VqdS)zIterate the specified tags.N)rr)rr+rr0rrr�elr'r'r(r�s� �r�identcCs
40  t�|�S)zEscape identifier.)r#�escape)r2r'r'r(r3�s
41  r3)Nr	)rN)Nr	r	)$�__doc__Z__meta__rr�rr#r�cmrr�utilrr�bs4�typingr
42  rrr
rr�__all__r�str�intrr*r�boolrrrrrr3r'r'r'r(�<module>s* �������
4344  	��������
45  ���������
46  ���������
47  ���������
48  ����������	
49  ����������	
50  �