bg>dZddlmZddlmZGddeZdS)z2 Tests for dict duplicate keys Pyflakes behavior. )messages)TestCaseceZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdS)Testc\|dtjtjdS)Nz{'yes': 1, 'yes': 2}flakesmMultiValueRepeatedKeyLiteralselfs h/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pyflakes/test/test_dict.pytest_duplicate_keyszTest.test_duplicate_keys 1 " * *     c0|ddS)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_py3s ()))))rc\|dtjtjdS)Nz{1: b'a', 1: u'a'}rr s r*test_duplicate_values_bytes_vs_unicode_py3z/Test.test_duplicate_values_bytes_vs_unicode_py31 * *     rc|dtjtjtjtjdS)Nz&{'yes': 1, 'yes': 2, 'no': 2, 'no': 3}rr s rtest_multiple_duplicate_keysz!Test.test_multiple_duplicate_keyss= 4 * * * *      rc\|dtjtjdS)Nz` def f(thing): pass f({'yes': 1, 'yes': 2}) rr s rtest_duplicate_keys_in_functionz$Test.test_duplicate_keys_in_function%5    * *     rc\|dtjtjdS)Nzlambda x: {(0,1): 1, (0,1): 2}rr s rtest_duplicate_keys_in_lambdaz"Test.test_duplicate_keys_in_lambda0s1 , * *     rc\|dtjtjdS)Nz{(0,1): 1, (0,1): 2}rr s rtest_duplicate_keys_tupleszTest.test_duplicate_keys_tuples7rrc\|dtjtjdS)Nz{(0,1): 1, (0,1.0): 2}rr s r(test_duplicate_keys_tuples_int_and_floatz-Test.test_duplicate_keys_tuples_int_and_float>s1 $ * *     rc\|dtjtjdS)Nz {1: 1, 1: 2}rr s rtest_duplicate_keys_intszTest.test_duplicate_keys_intsEs1  * *     rc\|dtjtjdS)Nz{True: 1, True: 2}rr s rtest_duplicate_keys_boolszTest.test_duplicate_keys_boolsLrrc\|dtjtjdS)Nz{False: 1, False: 2}rr s rtest_duplicate_keys_bools_falsez$Test.test_duplicate_keys_bools_falseSs1 " * *     rc\|dtjtjdS)Nz{None: 1, None: 2}rr s rtest_duplicate_keys_nonezTest.test_duplicate_keys_none[rrc\|dtjtjdS)Nz8 a = 1 {a: 1, a: 2} )r r MultiValueRepeatedKeyVariabler s rtest_duplicate_variable_keysz!Test.test_duplicate_variable_keysbs5    + +      rc\|dtjtjdS)NzJ a = 1 b = 2 {1: a, 1: b} rr s rtest_duplicate_variable_valuesz#Test.test_duplicate_variable_valueslrrc\|dtjtjdS)NzJ a = 1 b = 1 {1: a, 1: b} rr s r)test_duplicate_variable_values_same_valuez.Test.test_duplicate_variable_values_same_valuews7    * *     rc\|dtjtjdS)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} Nrr s r test_duplicate_key_float_and_intz%Test.test_duplicate_key_float_and_ints7    * *      rc0|ddS)Nz& {'yes': 1, 'yes': 1} rr s r&test_no_duplicate_key_error_same_valuez+Test.test_no_duplicate_key_error_same_value'       rc0|ddS)Nz% {'yes': 1, 'no': 2} rr s rtest_no_duplicate_key_errorsz!Test.test_no_duplicate_key_errorsr6rc0|ddS)Nz{(0,1): 1, (0,2): 1}rr s r0test_no_duplicate_keys_tuples_same_first_elementz5Test.test_no_duplicate_keys_tuples_same_first_elements *+++++rc0|ddS)Nz^ def test(thing): pass test({True: 1, None: 2, False: 1}) rr s r&test_no_duplicate_key_errors_func_callz+Test.test_no_duplicate_key_errors_func_call'       rc0|ddS)Nz{True: 1, None: 2, False: 1}rr s r)test_no_duplicate_key_errors_bool_or_nonez.Test.test_no_duplicate_key_errors_bool_or_nones 233333rc0|ddS)Nz {1: 1, 2: 1} rr s r!test_no_duplicate_key_errors_intsz&Test.test_no_duplicate_key_errors_intsr6rc0|ddS)NzN test = 'yes' rest = 'yes' {test: 1, rest: 2} rr s r!test_no_duplicate_key_errors_varsz&Test.test_no_duplicate_key_errors_varsr=rc0|ddS)Nz& {(0,1): 1, (0,2): 1} rr s r#test_no_duplicate_key_errors_tuplesz(Test.test_no_duplicate_key_errors_tuplesr6rc0|ddS)Nzl class Test(): pass f = Test() f.a = 1 {f.a: 1, f.a: 1} rr s r0test_no_duplicate_key_errors_instance_attributesz5Test.test_no_duplicate_key_errors_instance_attributess'       rN)__name__ __module__ __qualname__rrrrrrr r"r$r&r(r*r-r/r1r3r5r8r:r<r?rArCrErGrrrr s   ***                                                    ,,,   444              rrN)__doc__pyflakesrr pyflakes.test.harnessrrrKrrrOss#"""""******x x x x x 8x x x x x r