§
    îyIf—  ã                   ó>   — d Z ddlmZ ddlmZ  G d„ de¦  «        ZdS )z2
Tests for dict duplicate keys Pyflakes behavior.
é    )Úmessages)ÚTestCasec                   ó¤   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚTestc                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz{'yes': 1, 'yes': 2}©ÚflakesÚmÚMultiValueRepeatedKeyLiteral©Úselfs    úK/var/www/piapp/venv/lib/python3.11/site-packages/pyflakes/test/test_dict.pyÚtest_duplicate_keyszTest.test_duplicate_keys   ó1   € Ø�ŠØ"ÝÔ*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
ó    c                 ó0   — |                       d¦  «         d S )Nz{b'a': 1, u'a': 2}©r	   r   s    r   Ú(test_duplicate_keys_bytes_vs_unicode_py3z-Test.test_duplicate_keys_bytes_vs_unicode_py3   s   € Ø�ŠÐ(Ñ)Ô)Ð)Ð)Ð)r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz{1: b'a', 1: u'a'}r   r   s    r   Ú*test_duplicate_values_bytes_vs_unicode_py3z/Test.test_duplicate_values_bytes_vs_unicode_py3   ó1   € Ø�ŠØ ÝÔ*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óˆ   — |                       dt          j        t          j        t          j        t          j        ¦  «         d S )Nz&{'yes': 1, 'yes': 2, 'no': 2, 'no': 3}r   r   s    r   Útest_multiple_duplicate_keysz!Test.test_multiple_duplicate_keys   s=   € Ø�ŠØ4ÝÔ*ÝÔ*ÝÔ*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz`
            def f(thing):
                pass
            f({'yes': 1, 'yes': 2})
            r   r   s    r   Útest_duplicate_keys_in_functionz$Test.test_duplicate_keys_in_function%   ó5   € Ø�Šðõ
 Ô*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nzlambda x: {(0,1): 1, (0,1): 2}r   r   s    r   Útest_duplicate_keys_in_lambdaz"Test.test_duplicate_keys_in_lambda0   s1   € Ø�ŠØ,ÝÔ*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz{(0,1): 1, (0,1): 2}r   r   s    r   Útest_duplicate_keys_tupleszTest.test_duplicate_keys_tuples7   r   r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz{(0,1): 1, (0,1.0): 2}r   r   s    r   Ú(test_duplicate_keys_tuples_int_and_floatz-Test.test_duplicate_keys_tuples_int_and_float>   s1   € Ø�ŠØ$ÝÔ*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz{1: 1, 1: 2}r   r   s    r   Útest_duplicate_keys_intszTest.test_duplicate_keys_intsE   s1   € Ø�ŠØÝÔ*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz{True: 1, True: 2}r   r   s    r   Útest_duplicate_keys_boolszTest.test_duplicate_keys_boolsL   r   r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz{False: 1, False: 2}r   r   s    r   Útest_duplicate_keys_bools_falsez$Test.test_duplicate_keys_bools_falseS   s1   € à�ŠØ"ÝÔ*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz{None: 1, None: 2}r   r   s    r   Útest_duplicate_keys_nonezTest.test_duplicate_keys_none[   r   r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )Nz8
            a = 1
            {a: 1, a: 2}
            )r	   r
   ÚMultiValueRepeatedKeyVariabler   s    r   Útest_duplicate_variable_keysz!Test.test_duplicate_variable_keysb   s5   € Ø�Šðõ Ô+ÝÔ+ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )NzJ
            a = 1
            b = 2
            {1: a, 1: b}
            r   r   s    r   Útest_duplicate_variable_valuesz#Test.test_duplicate_variable_valuesl   r   r   c                 ó\   — |                       dt          j        t          j        ¦  «         d S )NzJ
            a = 1
            b = 1
            {1: a, 1: b}
            r   r   s    r   Ú)test_duplicate_variable_values_same_valuez.Test.test_duplicate_variable_values_same_valuew   s7   € ð 	�Šðõ
 Ô*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó\   — |                       dt          j        t          j        ¦  «         dS )zß
        These do look like different values, but when it comes to their use as
        keys, they compare as equal and so are actually duplicates.
        The literal dict {1: 1, 1.0: 1} actually becomes {1.0: 1}.
        z(
            {1: 1, 1.0: 2}
            Nr   r   s    r   Ú test_duplicate_key_float_and_intz%Test.test_duplicate_key_float_and_int„   s7   € ð 	�Šðõ Ô*ÝÔ*ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó0   — |                       d¦  «         d S )Nz&
        {'yes': 1, 'yes': 1}
        r   r   s    r   Ú&test_no_duplicate_key_error_same_valuez+Test.test_no_duplicate_key_error_same_value’   ó'   € Ø�Šð ñ 	ô 	ð 	ð 	ð 	r   c                 ó0   — |                       d¦  «         d S )Nz%
        {'yes': 1, 'no': 2}
        r   r   s    r   Útest_no_duplicate_key_errorsz!Test.test_no_duplicate_key_errors—   r6   r   c                 ó0   — |                       d¦  «         d S )Nz{(0,1): 1, (0,2): 1}r   r   s    r   Ú0test_no_duplicate_keys_tuples_same_first_elementz5Test.test_no_duplicate_keys_tuples_same_first_elementœ   s   € Ø�ŠÐ*Ñ+Ô+Ð+Ð+Ð+r   c                 ó0   — |                       d¦  «         d S )Nz^
        def test(thing):
            pass
        test({True: 1, None: 2, False: 1})
        r   r   s    r   Ú&test_no_duplicate_key_errors_func_callz+Test.test_no_duplicate_key_errors_func_callŸ   ó'   € Ø�Šð ñ 	ô 	ð 	ð 	ð 	r   c                 ó0   — |                       d¦  «         d S )Nz{True: 1, None: 2, False: 1}r   r   s    r   Ú)test_no_duplicate_key_errors_bool_or_nonez.Test.test_no_duplicate_key_errors_bool_or_none¦   s   € Ø�ŠÐ2Ñ3Ô3Ð3Ð3Ð3r   c                 ó0   — |                       d¦  «         d S )Nz
        {1: 1, 2: 1}
        r   r   s    r   Ú!test_no_duplicate_key_errors_intsz&Test.test_no_duplicate_key_errors_ints©   r6   r   c                 ó0   — |                       d¦  «         d S )NzN
        test = 'yes'
        rest = 'yes'
        {test: 1, rest: 2}
        r   r   s    r   Ú!test_no_duplicate_key_errors_varsz&Test.test_no_duplicate_key_errors_vars®   r=   r   c                 ó0   — |                       d¦  «         d S )Nz&
        {(0,1): 1, (0,2): 1}
        r   r   s    r   Ú#test_no_duplicate_key_errors_tuplesz(Test.test_no_duplicate_key_errors_tuplesµ   r6   r   c                 ó0   — |                       d¦  «         d S )Nzl
        class Test():
            pass
        f = Test()
        f.a = 1
        {f.a: 1, f.a: 1}
        r   r   s    r   Ú0test_no_duplicate_key_errors_instance_attributesz5Test.test_no_duplicate_key_errors_instance_attributesº   s'   € Ø�Šð ñ 	ô 	ð 	ð 	ð 	r   N)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r    r"   r$   r&   r(   r*   r-   r/   r1   r3   r5   r8   r:   r<   r?   rA   rC   rE   rG   © r   r   r   r   	   s‹  € € € € € ð
ð 
ð 
ð*ð *ð *ð
ð 
ð 
ð
ð 
ð 
ð	
ð 	
ð 	
ð
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ð	
ð 	
ð 	
ð
ð 
ð 
ð
ð 
ð 
ðð ð ð
ð ð ð
,ð ,ð ,ðð ð ð4ð 4ð 4ðð ð ð
ð ð ðð ð ð
ð ð ð ð r   r   N)Ú__doc__Úpyflakesr   r
   Úpyflakes.test.harnessr   r   rK   r   r   ú<module>rO      ss   ððð ð #Ð "Ð "Ð "Ð "Ð "Ø *Ð *Ð *Ð *Ð *Ð *ðxð xð xð xð xˆ8ñ xô xð xð xð xr   