§ x<ˆj— ã ó> — d Z ddlmZ ddlmZ G d„ de¦ « ZdS )z2 Tests for dict duplicate keys Pyflakes behavior. é )Úmessages)ÚTestCasec ó¤ — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z d„ Z d „ Zd „ Zd„ Z d„ Zd „ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚTestc ó\ — | dt j t j ¦ « d S )Nz{'yes': 1, 'yes': 2}©ÚflakesÚmÚMultiValueRepeatedKeyLiteral©Úselfs úi/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/pyflakes/test/test_dict.pyÚtest_duplicate_keyszTest.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 ó\ — | dt 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 óˆ — | dt 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 ó\ — | dt 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 ó\ — | dt j t j ¦ « d S )Nzlambda 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 ó\ — | dt j t j ¦ « d S )Nz{(0,1): 1, (0,1): 2}r r s r Útest_duplicate_keys_tupleszTest.test_duplicate_keys_tuples7 r r c ó\ — | dt 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 ó\ — | dt j t j ¦ « d S )Nz{1: 1, 1: 2}r r s r Útest_duplicate_keys_intszTest.test_duplicate_keys_intsE s1 € Ø�ŠØÝ Ô*Ý Ô*ñ ô ð ð ð r c ó\ — | dt j t j ¦ « d S )Nz{True: 1, True: 2}r r s r Útest_duplicate_keys_boolszTest.test_duplicate_keys_boolsL r r c ó\ — | dt 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 ó\ — | dt j t j ¦ « d S )Nz{None: 1, None: 2}r r s r Útest_duplicate_keys_nonezTest.test_duplicate_keys_none[ r r c ó\ — | dt 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 ó\ — | dt 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 ó\ — | dt 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 ó\ — | dt j t j ¦ « dS )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&