PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /proc/self/root/lib64/python3.12/lib2to3/fixes/__pycache__/ |
| Server: Linux server1.ngambekcore.com 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 04:00:07 EDT 2025 x86_64 IP: 159.198.77.92 |
| Dir : //proc/self/root/lib64/python3.12/lib2to3/fixes/__pycache__/fix_has_key.cpython-312.pyc |
�
�?h| � �Z � d Z ddlmZ ddlmZ ddlmZmZ G d� dej � Zy)a& Fixer for has_key().
Calls to .has_key() methods are expressed in terms of the 'in'
operator:
d.has_key(k) -> k in d
CAVEATS:
1) While the primary target of this fixer is dict.has_key(), the
fixer will change any has_key() method call, regardless of its
class.
2) Cases like this will not be converted:
m = d.has_key
if m(k):
...
Only *calls* to has_key() are converted. While it is possible to
convert the above to something like
m = d.__contains__
if m(k):
...
this is currently not done.
� )�pytree)�
fixer_base)�Name�parenthesizec � � e Zd ZdZdZd� Zy)� FixHasKeyTa�
anchor=power<
before=any+
trailer< '.' 'has_key' >
trailer<
'('
( not(arglist | argument<any '=' any>) arg=any
| arglist<(not argument<any '=' any>) arg=any ','>
)
')'
>
after=any*
>
|
negation=not_test<
'not'
anchor=power<
before=any+
trailer< '.' 'has_key' >
trailer<
'('
( not(arglist | argument<any '=' any>) arg=any
| arglist<(not argument<any '=' any>) arg=any ','>
)
')'
>
>
>
c
�h � |sJ �| j }|j j |j k( r&| j j |j � ry |j
d� }|d }|j }|d D �cg c] }|j � �� }}|d j � } |j
d� }
|
r|
D �cg c] }|j � �� }
}| j |j |j |j |j |j |j |j fv rt | � } t! |� dk( r|d }n t# j$ |j&